﻿<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <link rel="Shortcut Icon" href="../../../Content/aecc.ico" type="image/x-icon" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="../../../Content/element-plus/index.css">
  <link rel="stylesheet" href="../../../Content/nprogress/nprogress.min.css">
  <link rel="stylesheet" href="../../../styles/vue-page-common.css">
  <script src="../../../Scripts/hooks/containercheck/close.js"></script>
  <script src="../../../Scripts/Array.prototype.flat.js"></script>
  <script src="../../../Scripts/ResizeObserver.js"></script>
  <script src="../../../Content/vue3/vue.global.prod.js"></script>
  <script src="../../../Content/element-plus/index.full.min.js"></script>
  <script src="../../../Content/element-plus/icons-vue.js"></script>
  <script src="../../../Content/element-plus/zh-cn.min.js"></script>
  <script src="../../../Scripts/axios.min.js"></script>
  <script src="../../../Content/nprogress/nprogress.min.js"></script>
  <script src="../../../Scripts/dayjs.min.js"></script>
  <script src="../../../Scripts/axios.config.js"></script>
  <script src="../../../Scripts/crypto-js.min.js"></script>
  <script src="../../../Scripts/secret.js"></script>
  <title>生产报工</title>
  <style>
    .header {
      color: #fff;
      height: 50px;
      display: flex;
      align-items: center;
      background-image: linear-gradient(to right, #1E9FFF 0%, #68e0cf 100%);
    }

    .el-form-item__label {
      font-weight: normal;
    }

    .header-text {
      font-size: 22px;
      margin-left: 10px;
      font-weight: bold;
    }

    .el-breadcrumb__inner,
    .el-breadcrumb__separator {
      font-size: 16px;
      color: #fff !important;
    }

    .card-header-icon {
      color: #1E9FFF;
      margin-right: 5px;
      font-size: 20px;
    }

    .card-header-text {
      color: #000;
      font-size: 20px;
      font-weight: bold;
    }

    .flush-btn {
      position: absolute;
      right: 0;
      top: 0;
    }

    .el-card__body,
    .el-main {
      padding: 2px;
    }

    .el-submenu__title {
      font-size: 16px;
      font-weight: bold;
    }

    .el-sub-menu__title {
      font-size: 20px;
      color: #1E9FFF;
      font-weight: bold;
    }

    .info-text {
      font-size: 16px;
      height: 36px;
      line-height: 36px;
      margin-left: 10px;
    }

    .info-text-label {
      font-weight: bold;
      padding-right: 10px;
    }

    .el-form--label-top .el-form-item__label {
      padding: 0;
    }

    .el-form-item {
      margin-bottom: 10px;
    }

    .el-tabs__item {
      font-size: 16px;
      font-weight: bold;
    }

    .item {
      display: inline-block;
      text-align: center;
      margin-right: 25px;
    }

    .item-image-container {
      width: 80px;
      height: 40px;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .item-text {
      font-weight: bold;
      font-size: 16px;
      color: #1E9FFF;
      margin-top: 5px;
    }

    .handle-container {
      border-radius: 4px;
      border: 1px solid #EBEEF5;
      background-image: linear-gradient(to right, #C4E6FF 0%, #fff 100%);
      margin-top: 10px;
      padding: 10px;
      box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
    }

    .item-icon {
      font-size: 35px;
      color: #1E9FFF;
      transition: all 1.5s;
      font-size: 30px;
    }

    .sub-menu-icon {
      font-size: 20px !important;
      transition: all 1.5s;
    }

    .sub-menu-icon:hover {
      transform: scale(1.3);
    }

    .item-icon:hover {
      transform: scale(1.3);
    }

    /* 覆盖菜单项样式 */
    .el-menu-item {
      padding-left: 20px !important;
    }

    .el-menu-item.is-active {
      font-weight: bold;
      color: #1E9FFF;
      border: 1px dashed #1E9FFF;
      border-radius: 10px;
      font-size: 16px;
    }

    /* 待报工 */
    #unReport .el-menu-item.is-active {
      color: #67C23A;
      border: 1px dashed #67C23A;
    }

    /* 待检验 */
    #unCheck .el-menu-item.is-active {
      color: #F56C6C;
      border: 1px dashed #F56C6C;
    }

    .el-tree-node__content {
      height: 30px !important;
    }

    .el-tree-node__content:hover {
      font-weight: bold;
      color: #409EFF;
    }

    /* 徽标 */
    .el-badge__content.is-fixed {
      top: 5px;
    }

    .highlight-row {
      background-color: oldlace !important;
    }
  </style>
</head>

<body>
  <div id="app" v-cloak>
    <el-watermark :content="'RS031'"></el-watermark>
    <!-- 头部标题区域 -->
    <el-row class="header">
      <el-col :span="6">
        <div style="display: flex;align-items: center;position: relative;">
          <el-icon style="font-size: 22px;margin-left: 10px;">
            <home-filled />
          </el-icon>
          <span style="font-size: 20px;margin-left: 5px;font-weight: bold;">中国航发黎阳-制造执行系统</span>
        </div>
      </el-col>
      <el-col :span="14">
        <el-breadcrumb separator="/">
          <el-breadcrumb-item>{{userInfo.factoryname}}</el-breadcrumb-item>
          <el-breadcrumb-item>{{userInfo.workcentername}}</el-breadcrumb-item>
          <el-breadcrumb-item>{{userInfo.teamname ? userInfo.teamname : '--'}}</el-breadcrumb-item>
        </el-breadcrumb>
      </el-col>
      <el-col :span="4" style="text-align: right;">
        <span style="margin-right:20px;">{{currentTime}}</span>
      </el-col>
    </el-row>

    <!-- 中间部分 -->
    <el-row :gutter="10" style="margin: 10px 5px;">
      <!-- 左侧 -->
      <el-col :span="6">
        <!-- 个人信息 -->
        <el-card class="box-card">
          <template #header>
            <div style="display: flex;align-items: center;position: relative;">
              <el-icon class="card-header-icon">
                <Avatar />
              </el-icon>
              <span class="card-header-text">个人信息</span>
              <el-button round :disabled="pageObj.userInfoBtnFlushDisabled" class="flush-btn"
                @click="handleUserInfoFlushClick">
                <el-icon class="sub-menu-icon">
                  <Refresh />
                </el-icon>
                <span style="margin-left: 6px;">刷新</span>
              </el-button>
            </div>
          </template>
          <el-row :gutter="10">
            <el-col :span="8">
              <div v-if="userInfo.userimageurl">
                <el-image style="width: 105px;height: 140px;" :src="userInfo.userimageurl"
                  :preview-src-list="[userInfo.userimageurl]">
                </el-image>
              </div>
              <div v-else>
                <el-image style="width: 105px;height: 140px;border:1px dashed #1E9FFF;">
                </el-image>
              </div>
            </el-col>
            <el-col :span="16">
              <div class="info-text">
                <span class="info-text-label">姓名:</span>{{userInfo.fullname}}
              </div>
              <div class="info-text">
                <span class="info-text-label">今日排班:</span>{{employeeWorkDate.today}}
              </div>
              <div class="info-text">
                <span class="info-text-label">明日排班:</span>{{employeeWorkDate.tomorrow}}
              </div>
              <div class="info-text">
                <span class="info-text-label">本月工时:</span>{{worktime}}
              </div>
            </el-col>
          </el-row>
        </el-card>

        <!-- 我的任务 -->
        <el-card class="box-card" style="margin-top: 10px;">
          <template #header>
            <div style="display: flex;align-items: center;position: relative;">
              <el-icon class="card-header-icon">
                <Flag />
              </el-icon>
              <span class="card-header-text">我的任务</span>
              <el-button round :disabled="pageObj.taskInfoBtnFlushDisabled" class="flush-btn" @click="handleTaskFlush">
                <el-icon class="sub-menu-icon">
                  <Refresh />
                </el-icon>
                <span style="margin-left: 6px;">查询</span>
              </el-button>
            </div>
          </template>

          <el-scrollbar :height="clientHeight">
            <el-form style="margin:10px 20px;" @submit.prevent>
              <el-form-item>
                <el-input :prefix-icon="'Search'" :disabled="pageObj.containerScanDisabled"
                  v-model.trim="searchObj.containername" placeholder="请扫卡或输入完整流水卡号" @blur="handleContainerSearchBlur"
                  @keyup.enter="handleContainerSearchBlur" clearable>
                </el-input>
              </el-form-item>
              <el-form-item>
                <el-input :prefix-icon="'Search'" :disabled="pageObj.containerScanDisabled"
                  v-model.trim="searchObj.productname" placeholder="请输入零件号" clearable>
                </el-input>
              </el-form-item>
              <el-form-item>
                <el-input :prefix-icon="'Search'" :disabled="pageObj.containerScanDisabled"
                  v-model.trim="searchObj.mfgordername" placeholder="请输入订单号" clearable>
                </el-input>
              </el-form-item>
            </el-form>

            <el-menu unique-opened @select="menuSelect" ref="menuDataRef">
              <!-- 待领工 -->
              <el-sub-menu index="待领工">
                <template #title>
                  <el-icon class="sub-menu-icon">
                    <set-up />
                  </el-icon>
                  <el-badge :value="unReceiveDataRows.value" :max="999" type="primary">
                    <span style="font-size: 18px;">待领工</span>
                  </el-badge>
                </template>
                <el-menu-item v-for="(i,index) in notReceivedList" :key="i.productbatch" :label="i.productbatch"
                  :value="i.productbatch" :index="'待领工&' + i.productbatch + '&' + i.workflowstepid">
                  <el-popover trigger="hover" placement="top" width="300">
                    <p>零件名称：{{i.productdescription}}</p>
                    <p>当前工序：{{i.workflowstepname}}</p>
                    <p>待领工数量：{{i.wipqty}}</p>
                    <template #reference>
                      <el-icon>
                        <info-filled />
                      </el-icon>
                    </template>
                  </el-popover>
                  {{i.productbatch}} -【{{i.workflowstepname}}】-【{{i.containertypename}}】
                </el-menu-item>
              </el-sub-menu>
              <!-- 待报工 -->
              <el-sub-menu index="待报工">
                <template #title>
                  <el-icon style="color:#67C23A" class="sub-menu-icon">
                    <video-play />
                  </el-icon>
                  <el-badge :value="unReportDataRows.value" :max="1000" type="success">
                    <span style="font-size: 18px;color:#67C23A;">待报工</span>
                  </el-badge>
                </template>
                <el-menu-item v-for="i in notReportedList" :key="i.productbatch" :label="i.productbatch"
                  :value="i.productbatch" :index="'待报工&' + i.productbatch + '&' + i.workflowstepid">
                  <el-popover trigger="hover" placement="top" width="300">
                    <p>零件名称：{{i.productdescription}}</p>
                    <p>当前工序：{{i.workflowstepname}}</p>
                    <p>待报工数量：{{i.wipqty}}</p>
                    <template #reference>
                      <el-icon>
                        <info-filled />
                      </el-icon>
                    </template>
                  </el-popover>
                  {{i.productbatch}} -【{{i.workflowstepname}}】-【{{i.containertypename}}】
                </el-menu-item>
              </el-sub-menu>
              <!-- 待检验 -->
              <el-sub-menu index="待检验">
                <template #title>
                  <el-icon style="color:#F56C6C" class="sub-menu-icon">
                    <Stamp />
                  </el-icon>
                  <el-badge :value="unCheckContainerCount" :max="1000" type="danger">
                    <span style="font-size: 18px;color:#F56C6C;">待检验</span>
                  </el-badge>
                </template>
                <el-menu-item v-for="i in unCheckContainerData" :key="i.productbatch" :label="i.productbatch"
                  :value="i.productbatch" :index="'待检验&' + i.productbatch + '&' + i.workflowstepid">
                  {{i.productbatch}} -【{{i.workflowstepname}}】-【{{i.containertypename}}】
                </el-menu-item>
              </el-sub-menu>
            </el-menu>
        </el-card>
      </el-col>

      <!-- 右侧 -->
      <el-col :span="18">
        <!-- 生产报工区域 -->
        <el-card class="box-card">
          <template #header>
            <div style="display: flex;align-items: center;">
              <el-icon class="card-header-icon">
                <video-play />
              </el-icon>
              <span class="card-header-text">生产报工</span>
            </div>
          </template>
          <div style="padding: 10px;">
            <!-- 批次信息 -->
            <el-form :inline="true" :disabled="true" :model="containerInfo" :label-position="'top'">
              <el-form-item label="生产订单号">
                <el-input v-model="containerInfo.mfgordername" style="width: 140px;"></el-input>
              </el-form-item>

              <el-form-item label="零件名称">
                <el-input v-model="containerInfo.productdescription" style="width: 120px;"></el-input>
              </el-form-item>

              <el-form-item label="批次卡类型">
                <el-input style="width: 100px;" v-model="containerInfo.containertypename"></el-input>
              </el-form-item>

              <el-form-item label="件号/批次号">
                <el-input style="width: 260px;" v-model="containerInfo.togetherflag"></el-input>
              </el-form-item>

              <el-form-item label="在制总数">
                <el-input style="width: 60px;" v-model="containerInfo.wipqty2"></el-input>
              </el-form-item>

              <el-form-item label="当前工序号">
                <el-input v-model="containerInfo.specno" style="width: 80px;"></el-input>
              </el-form-item>

              <el-form-item label="当前工序">
                <el-input v-model="containerInfo.nowworkflowstepname" style="width: 130px;"></el-input>
              </el-form-item>

              <el-form-item label="计划开始时间">
                <el-input style="width: 100px;" v-model="containerInfo.plannedstartdate"></el-input>
              </el-form-item>

              <el-form-item label="计划完成时间">
                <el-input style="width: 100px;" v-model="containerInfo.plannedfinishdate"></el-input>
              </el-form-item>

              <el-form-item label="派工人">
                <el-input style="width: 80px;" v-model="containerInfo.dispatchEmp"></el-input>
              </el-form-item>

              <el-form-item label="派工时间">
                <el-input style="width: 100px;" v-model="containerInfo.dispatchDate"></el-input>
              </el-form-item>

              <el-form-item label="派工数">
                <el-input style="width: 60px;" v-model="containerInfo.dispatchQty"></el-input>
              </el-form-item>

              <el-form-item label="已报总数">
                <el-input style="width: 60px;" v-model.number="containerInfo.reportedQty"></el-input>
              </el-form-item>

              <el-form-item label="已报废">
                <el-input style="width: 60px;" v-model.number="containerInfo.lossedQty">
                  <template #prefix>
                    <el-icon color="#F56C6C">
                      <circle-close-filled />
                    </el-icon>
                  </template>
                </el-input>
              </el-form-item>

              <el-form-item label="领工人">
                <el-input style="width: 80px;" v-model="containerInfo.receiveemp"></el-input>
              </el-form-item>

              <el-form-item label="领工时间">
                <el-input style="width: 100px;" v-model="containerInfo.receivedate"></el-input>
              </el-form-item>

              <el-form-item label="派工id" v-if="false">
                <el-input style="width: 80px;" v-model="containerInfo.containerstepdispatchid"></el-input>
              </el-form-item>

              <el-form-item label="是否已首件报工" v-if="false">
                <el-input style="width: 80px;" v-model="containerInfo.firstchecknum"></el-input>
              </el-form-item>
            </el-form>

            <el-tabs v-model="reportZone">
              <el-tab-pane label="报工区域" name="报工区域"></el-tab-pane>
            </el-tabs>

            <el-scrollbar :height="inputHeight">
              <el-row>
                <el-col :span="15">
                  <!-- 报工表单信息 -->
                  <el-form :disabled="pageObj.reportDataEditDisabled" :inline=" true" :model="reportDataInfo"
                    :label-position="'top'">
                    <el-form-item label="报工类型">
                      <el-radio-group v-model="reportType" :disabled="pageObj.reportTypeTabsDisabled" size="small">
                        <el-radio value="首件" size="large">首件</el-radio>
                        <el-radio value="其他" size="large">其他</el-radio>
                        <el-radio value="返修" size="large">返修</el-radio>
                      </el-radio-group>
                    </el-form-item>
                    <el-form-item :label="factoryUserattributesConfig.isWorkerCheckSelf ? '自检合格数' : '报工数' ">
                      <el-input @blur="handleSelfCheckPassQtyBlur" style="width: 80px;"
                        v-model.trim="reportDataInfo.selfCheckPassQty">
                        <template #prefix>
                          <el-icon color="#67C23A">
                            <circle-check-filled />
                          </el-icon>
                        </template>
                      </el-input>
                    </el-form-item>

                    <el-form-item label="自检超差数" v-if="factoryUserattributesConfig.isWorkerCheckSelf">
                      <el-input @blur="handleSelfCheckDefeatQtyBlur" style="width: 80px;"
                        v-model.trim="reportDataInfo.selfCheckDefeatQty">
                        <template #prefix>
                          <el-icon color="#E6A23C">
                            <warn-triangle-filled />
                          </el-icon>
                        </template>
                      </el-input>
                    </el-form-item>

                    <el-form-item label="自检报废数" v-if="factoryUserattributesConfig.isWorkerCheckSelf">
                      <el-input @blur="handleSelfCheckLossQtyBlur" style="width: 80px;"
                        v-model.trim="reportDataInfo.selfCheckLossQty" :disabled="pageObj.selfCheckLossQtyDisabled">
                        <template #prefix>
                          <el-icon color="#F56C6C">
                            <circle-close-filled />
                          </el-icon>
                        </template>
                      </el-input>
                    </el-form-item>

                    <el-form-item label="报工设备">
                      <el-select v-model="reportDataInfo.resourceid" placeholder="请选择设备" filterable
                        style="width: 200px;">
                        <el-option v-for="i in resourceList" :key="i.resourceid" :label="i.resourcename"
                          :value="i.resourceid">
                        </el-option>
                      </el-select>
                    </el-form-item>

                    <el-form-item label="结余件确认">
                      <el-input v-model="reportDataInfo.surPlusEmployeeCardNo" placeholder="工区长或班组长此处刷卡"
                        @blur="handleSurPlusEmployeeBlur" :disabled="containerInfo.containertype !== 2"></el-input>
                    </el-form-item>

                    <el-form-item label="确认人">
                      <el-input style="width: 80px;" v-model="reportDataInfo.surPlusEmployeeName" :disabled="true">
                      </el-input>
                    </el-form-item>

                    <el-form-item label="备注一(数量)">
                      <el-input v-model="reportDataInfo.Qty2"></el-input>
                    </el-form-item>

                    <el-form-item label="备注二(单位)">
                      <el-select v-model="reportDataInfo.UOM2ID" placeholder="请选择" filterable clearable
                        style="width: 160px;">
                        <el-option v-for="i in uomList" :key="i.uomid" :label="i.uomname" :value="i.uomid">
                        </el-option>
                      </el-select>
                    </el-form-item>

                    <el-form-item label="试件数">
                      <el-input style="width: 80px;" v-model.trim="reportDataInfo.INMTQty" @blur="handleINMTQtyBlur"
                        :disabled="containerInfo.containertype === 3">
                        <template #prefix>
                          <el-icon color="#67C23A">
                            <circle-check-filled />
                          </el-icon>
                        </template>
                      </el-input>
                    </el-form-item>

                    <el-form-item label="试件废票数">
                      <el-input style="width: 80px;" v-model.trim="reportDataInfo.INMTLossQty"
                        @blur="handleINMTLossQtyBlur" :disabled="containerInfo.containertype === 3">
                        <template #prefix>
                          <el-icon color="#F56C6C">
                            <circle-close-filled />
                          </el-icon>
                        </template>
                      </el-input>
                    </el-form-item>

                    <el-form-item label="首件批次号" v-if="userInfo.factorycode === '608'">
                      <el-input v-model="reportDataInfo.firstcheckcontainerno" readonly>
                        <template #append>
                          <div style="color: #409EFF;" @click="handleYpFirstContainerSearchClick">
                            <el-button type="primary" :icon="'Search'" />
                          </div>
                        </template>
                      </el-input>
                    </el-form-item>

                    <el-form-item label="关键过程批次号" v-if="userInfo.factorycode === '608'">
                      <el-input v-model="reportDataInfo.KeyProcessBatchNo"></el-input>
                    </el-form-item>

                    <el-form-item label="检验员" v-if="factoryUserattributesConfig.isWorkerChoseChecker">
                      <el-select v-model="reportDataInfo.Checker" placeholder="请选择" filterable clearable
                        style="width: 160px;">
                        <el-option v-for="i in checkerList" :key="i.employeeid" :label="i.fullname"
                          :value="i.employeeid">
                        </el-option>
                      </el-select>
                    </el-form-item>
                    <el-form-item label="备注">
                      <el-input v-model="reportDataInfo.notes">
                      </el-input>
                    </el-form-item>
                  </el-form>
                </el-col>
                <!-- 选项卡：子批次、集件信息、待检验信息 -->
                <el-col :span="9">
                  <el-tabs v-model="tabIndex">
                    <el-tab-pane label="子批次号" name="子批次号" :disabled="pageObj.containerInfoTabsDisabled">
                      <!-- 子批次号表格 -->
                      <el-table :height="tableHeight" ref="childContainerTableRef" :data="childContainerList" stripe
                        border @selection-change="handleSelectionChange">
                        <el-table-column type="index" width="50"></el-table-column>
                        <el-table-column type="selection" width="40"></el-table-column>
                        <el-table-column label="批次号" prop="containername" show-overflow-tooltip>
                        </el-table-column>
                        <el-table-column label="是否报废" prop="status" width="80"
                          v-if="containerInfo.containertypename === '批量带子序号'">
                          <template #default="scope">
                            <el-switch style="--el-switch-on-color: #F56C6C;" v-model="scope.row.status" active-text="是"
                              inactive-text="否" inline-prompt>
                            </el-switch>
                          </template>
                        </el-table-column>
                        <el-table-column label="批次id" prop="containerid" width="100" v-if="false"></el-table-column>
                        <el-table-column label="派工id" prop="containerstepdispatchid" width="100" v-if="false"
                          show-overflow-tooltip>
                        </el-table-column>
                        <el-table-column label="派工日期" prop="dispatchdate" width="100"
                          v-if="containerInfo.containertype === 7" :formatter="dateFormatter">
                        </el-table-column>
                        <el-table-column label="计划完成" prop="plannedfinishdate" width="100"
                          v-if="containerInfo.containertype === 7" :formatter="dateFormatter">
                        </el-table-column>
                      </el-table>
                    </el-tab-pane>
                    <!-- 集件信息选项卡 -->
                    <el-tab-pane label="集件信息" name="集件信息" :disabled="pageObj.containerInfoTabsDisabled">
                      <el-table :height="tableHeight" :data="collectInfoList" stripe border>
                        <el-table-column type="index" width="60"></el-table-column>
                        <el-table-column label="零件图号" prop="productname"></el-table-column>
                        <el-table-column label="单台数" prop="qtyrequired" width="80"></el-table-column>
                      </el-table>
                    </el-tab-pane>
                    <el-tab-pane label="待检验信息" name="待检验信息" :disabled="pageObj.containerInfoTabsDisabled">
                      <el-table :height="tableHeight" ref="unCheckDetailListRef" :data="unCheckDetailList" stripe
                        border>
                        <el-table-column type="index" width="50"></el-table-column>
                        <el-table-column type="selection" width="40"></el-table-column>
                        <el-table-column label="批次id" prop="containerid" width="100" v-if="false"></el-table-column>
                        <el-table-column label=" 批次号" prop="containername" width="160" show-overflow-tooltip>
                        </el-table-column>
                        <el-table-column label="报工类型" prop="checktype" width="60"></el-table-column>
                        <el-table-column label="报工人" prop="workername" width="70" show-overflow-tooltip>
                        </el-table-column>
                        <el-table-column label="报工数量" prop="reportqty" width="60" show-overflow-tooltip>
                        </el-table-column>
                        <el-table-column label="待检人" prop="checkername" width="70" show-overflow-tooltip>
                        </el-table-column>
                        <el-table-column label="报工时间" prop="reportdate" :formatter="dateFormatter" width="100">
                        </el-table-column>
                      </el-table>
                    </el-tab-pane>
                  </el-tabs>
                </el-col>
              </el-row>
            </el-scrollbar>
          </div>
        </el-card>
        <!-- 按钮区域 -->
        <div class="handle-container">
          <div class="item" v-if="currentSubMenuItemName === '待领工'">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleReceiveClick" :disabled="btnsConfig.receiveBtnDisabled">
                <el-icon class="item-icon">
                  <set-up />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">领工</div>
          </div>

          <div class="item" v-if="currentSubMenuItemName === '待报工'">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleRevokeReceiveClick">
                <el-icon class="item-icon">
                  <refresh-left />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">撤销领工</div>
          </div>

          <div class="item" v-if="currentSubMenuItemName === '待报工'">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleReportClick" :disabled="btnsConfig.reportBtnDisabled">
                <el-icon class="item-icon">
                  <video-play />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">报工</div>
          </div>

          <div class="item" v-if="currentSubMenuItemName === '待检验'">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleRevokeReportClick">
                <el-icon class="item-icon">
                  <circle-close />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">撤销报工</div>
          </div>

          <div class="item">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleDocumentViewClick"
                :disabled="btnsConfig.documentViewBtnDisabled">
                <el-icon class="item-icon">
                  <Document />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">工艺查看</div>
          </div>

          <div class="item">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleContainerViewClick"
                :disabled="btnsConfig.containerViewBtnDisabled">
                <el-icon class="item-icon">
                  <Compass />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">流卡预览</div>
          </div>

          <div class="item">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleBomViewClick" :disabled="btnsConfig.bomViewBtnDisabled">
                <el-icon class="item-icon">
                  <icon-menu />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">配套表查看</div>
          </div>

          <div class="item">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleSurpassbillClick" :disabled="btnsConfig.surpassbillBtnDisabled">
                <el-icon class="item-icon">
                  <Paperclip />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">超越单查看</div>
          </div>

          <div class="item" v-if="currentSubMenuItemName === '待报工'">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleInputCheckPointResultClick"
                :disabled="btnsConfig.checkPointBtnDisabled">
                <el-icon class="item-icon">
                  <Edit />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">实测值录入</div>
          </div>

          <div class="item">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleMESFeedbackClick" :disabled="btnsConfig.mesFeedbackBtnDisabled">
                <el-icon class="item-icon">
                  <question-filled />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">问题快反</div>
          </div>

          <div class="item">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleResourceStatusClick"
                :disabled="btnsConfig.resourceStatusBtnDisabled">
                <el-icon class="item-icon">
                  <edit-pen />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">设备状态录入</div>
          </div>

          <div class="item">
            <div class="item-image-container" id="totalTask">
              <el-link :underline="false" @click="handleUnReportWorkflowStepCountClick"
                :disabled="btnsConfig.resourceStatusBtnDisabled">
                <el-badge :value="unReportWorkflowStepCount" :max="999" class="item">
                  <el-icon class="item-icon">
                    <Flag />
                  </el-icon>
                </el-badge>
              </el-link>
            </div>
            <div class="item-text">待完成任务</div>
          </div>

          <div class="item">
            <div class="item-image-container" id="totalTask">
              <el-link :underline="false" @click="handleProcessDashboardClick">
                <el-icon class="item-icon">
                  <Location />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">零件进度表</div>
          </div>

          <div class="item">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleNCProgramViewClick">
                <el-icon class="item-icon">
                  <icon-view />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">NC附件查看</div>
          </div>

          <div class="item">
            <div class="item-image-container">
              <el-link :underline="false">
                <el-popover placement="top-start" title="" :width="200" trigger="hover">
                  <div style="margin-bottom: 10px;">
                    <el-link type="primary" @click="openUrl('按需配送')">按需配送</el-link>
                  </div>
                  <div style="margin-bottom: 10px;">
                    <el-link type="primary" @click="openUrl('工位接收')">工位接收</el-link>
                  </div>
                  <div style="margin-bottom: 10px;">
                    <el-link type="primary" @click="openUrl('单元接收')">单元接收</el-link>
                  </div>
                  <div style="margin-bottom: 10px;">
                    <el-link type="primary" @click="openUrl('回收发起')">回收发起</el-link>
                  </div>
                  <div style="margin-bottom: 10px;">
                    <el-link type="primary" @click="openUrl('快反待办')">快反待办</el-link>
                  </div>
                  <template #reference>
                    <el-icon class="item-icon">
                      <Grid />
                    </el-icon>
                  </template>
                </el-popover>
              </el-link>
            </div>
            <div class="item-text">跳转链接</div>
          </div>
          <div class="item">
            <div class="item-image-container">
              <el-link :underline="false" @click="handleThreeCardViewClick">
                <el-icon class="item-icon">
                  <icon-view />
                </el-icon>
              </el-link>
            </div>
            <div class="item-text">三定卡片查看</div>
          </div>
        </div>
      </el-col>
    </el-row>

    <!-- 叶片首件批次号选择弹出框 -->
    <el-dialog v-model="firstCheckDialogVisible" title="首件批次号选择" width="60%">
      <el-row>
        <el-col :span="12">
          <h3>已指定的首件批次号</h3>
          <el-table :data="checkedContainerNoList" border stripe ref="checkedContainerNoListTableRef" height="400">
            <el-table-column type="selection"></el-table-column>
            <el-table-column prop="firstcheckcontainerno" label="首件批次号"></el-table-column>
          </el-table>
        </el-col>
        <el-col :span="12">
          <h3>当前批次子序号</h3>
          <el-table :data="currentContainerNoList" border stripe ref="currentContainerNoListTableRef" height="400">
            <el-table-column type="selection"></el-table-column>
            <el-table-column prop="containerid" label="批次id" v-if="false"></el-table-column>
            <el-table-column prop="containername" label="子序号"></el-table-column>
          </el-table>
        </el-col>
      </el-row>
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="firstCheckDialogVisible = false">取消</el-button>
          <el-button type="primary" @click="handleFirstContainerConfirmClick">确认</el-button>
        </span>
      </template>
    </el-dialog>

    <!-- 文档查看对话框 -->
    <el-dialog v-model="documentViewDialogVisible" title="文档查看" width="60%" :draggable="true" align-center>
      <el-row :gutter="10">
        <el-col :span="14">
          <el-scrollbar height="400">
            <el-card>
              <template #header>
                <div style="display: flex;align-items: center;position: relative;">
                  <el-icon class="card-header-icon" style="font-size: 20px;">
                    <info-filled />
                  </el-icon>
                  <span class="card-header-text">工艺信息</span>
                </div>
              </template>
              <el-tree :data="treeData" node-key="id" :default-expand-all="true" :expand-on-click-node="false"
                @node-click="handleNodeClick">
                <template #default="scope">
                  <el-icon v-if="scope.data.type !== 'spec'" style="color:orange;margin-right: 10px;">
                    <Folder />
                  </el-icon>
                  <el-icon v-else style="margin-right: 10px;">
                    <Grid />
                  </el-icon>
                  {{scope.data.label}}
                </template>
              </el-tree>
            </el-card>
          </el-scrollbar>
        </el-col>
        <el-col :span="10">
          <el-card>
            <template #header>
              <div style="display: flex;align-items: center;position: relative;">
                <el-icon class="card-header-icon" style="font-size: 20px;">
                  <List />
                </el-icon>
                <span class="card-header-text">文档清单</span>
              </div>
            </template>
            <el-table :data="documentList" stripe border>
              <el-table-column type="index" width="50"></el-table-column>
              <el-table-column label="文档名称" prop="documentname" show-overflow-tooltip>
              </el-table-column>
              <el-table-column label="操作" prop="filepath" width="120">
                <template #default="scope">
                  <el-link type="primary" @click="handleOpenDocumentClick(scope.row.filepath)">查看文档</el-link>
                </template>
              </el-table-column>
            </el-table>
          </el-card>
        </el-col>
      </el-row>
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="documentViewDialogVisible = false">关闭</el-button>
        </span>
      </template>
    </el-dialog>

    <!-- 超越单查看对话框 -->
    <el-dialog v-model="surpassbillDialogVisible" title="超越单信息" width="60%" :draggable="true" align-center>
      <el-card>
        <template #header>
          <div style="display: flex;align-items: center;position: relative;">
            <el-icon class="card-header-icon" style="font-size: 20px;">
              <info-filled />
            </el-icon>
            <span class="card-header-text">超越单信息</span>
          </div>
        </template>
        <el-table :data="surpassbillInfoList" stripe height="400">
          <el-table-column prop="containername" label="零件和批次"></el-table-column>
          <el-table-column prop="surpassbillname" label="超越单号" width="120" show-overflow-tooltip></el-table-column>
          <el-table-column prop="surpassbillrevision" label="超越版本" width="80" show-overflow-tooltip></el-table-column>
          <el-table-column prop="processno" label="工艺规程" width="100" show-overflow-tooltip></el-table-column>
          <el-table-column prop="specno" label="工序号" width="100" show-overflow-tooltip></el-table-column>
          <el-table-column prop="remark" label="超越单备注" width="100" show-overflow-tooltip></el-table-column>
          <el-table-column prop="effective" label="有效期" width="100" show-overflow-tooltip></el-table-column>
        </el-table>
      </el-card>

      <el-card style="margin-top: 10px;">
        <template #header>
          <div style="display: flex;align-items: center;position: relative;">
            <el-icon class="card-header-icon" style="font-size: 20px;">
              <info-filled />
            </el-icon>
            <span class="card-header-text">超越单附件信息</span>
          </div>
        </template>
        <el-table :data="surpassDocList" stripe>
          <el-table-column prop="accessoriesname" label="附件">
            <template #default="scope">
              <el-link :href="scope.row.url" target="_blank">{{scope.row.accessoriespath}}</el-link>
            </template>
          </el-table-column>
          <el-table-column prop="surpassbillname" label="超越单号"></el-table-column>
        </el-table>
      </el-card>

      <template #footer>
        <span class="dialog-footer">
          <el-button @click="surpassbillDialogVisible = false">关闭</el-button>
        </span>
      </template>
    </el-dialog>

    <!-- 设备状态录入对话框 -->
    <el-dialog v-model="resourceStatusMaintDialogVisible" title="设备状态信息录入" width="60%" :draggable="true" align-center>
      <el-card style="padding:10px;margin-top:10px;">
        <template #header>
          <div style="display: flex;align-items: center;position: relative;">
            <el-icon class="card-header-icon" style="font-size: 20px;">
              <info-filled />
            </el-icon>
            <span class="card-header-text">设备清单</span>
          </div>
        </template>
        <el-table :data="resourceStatusList" stripe ref="resourceStatusListRef" height="400">
          <el-table-column type="selection"></el-table-column>
          <el-table-column prop="resourceid" label="resourceid" v-if="false"></el-table-column>
          <el-table-column prop="resourcename" label="设备"></el-table-column>
          <el-table-column prop="description" label="名称"></el-table-column>
        </el-table>
      </el-card>
      <el-card style="margin-top:10px;">
        <template #header>
          <div style="display: flex;align-items: center;position: relative;">
            <el-icon class="card-header-icon" style="font-size: 20px;">
              <info-filled />
            </el-icon>
            <span class="card-header-text">状态</span>
          </div>
        </template>
        <el-radio-group style="margin: 20px;" v-model="resourceStatus">
          <el-radio value="开机">开机</el-radio>
          <el-radio value="停机">停机</el-radio>
          <el-radio value="维修">维修</el-radio>
        </el-radio-group>
      </el-card>
      <template #footer>
        <span class="dialog-footer">
          <el-button type="primary" @click="handleResourceStatusConfirmClick">确认</el-button>
          <el-button @click="resourceStatusMaintDialogVisible=false">关闭</el-button>
        </span>
      </template>
    </el-dialog>

    <!-- 实测值录入 -->
    <el-dialog v-model="inputCheckResultObj.dialogVisible" :top="'100px'" title="实测值录入" width="98%" :draggable="false"
      align-center>
      <el-table height="80" :data="inputCheckResultObj.containerList" stripe border>
        <el-table-column label="批次id" prop="containerid" v-if="false"></el-table-column>
        <el-table-column label="工序id" prop="workflowstepid" v-if="false"></el-table-column>
        <el-table-column label="流水卡号" prop="containername" show-overflow-tooltip></el-table-column>
        <el-table-column label="产品" prop="productdescription" show-overflow-tooltip></el-table-column>
        <el-table-column label="批次类型" prop="containertype" width="120">
          <template #default="scope">
            <span v-if="scope.row.containertype === 2">批量加工</span>
            <span v-else-if="scope.row.containertype === 7">单件加工</span>
            <span v-else>批量带子序号</span>
          </template>
        </el-table-column>
        <el-table-column label="数量" prop="wipqty"></el-table-column>
        <el-table-column label="工序" prop="workflowstepname"></el-table-column>
      </el-table>
      <el-row :gutter="10">
        <el-col :span="18">
          <el-row :gutter="10">
            <el-col :span="19">
              <el-tabs v-model="inputCheckResultObj.tabObj.checkitem">
                <el-tab-pane label="检测项区域" name="checkitem">
                  <el-table height="340" ref="inputCheckResultDialogCheckItemTableRef"
                    :data="inputCheckResultObj.checkitemList" @selection-change="getStepCheckPointResult"
                    @row-click="checkItemRowClick" stripe border>
                    <el-table-column type="index" width="50"></el-table-column>
                    <el-table-column type="selection" width="40"></el-table-column>
                    <el-table-column label="关重符号" prop="name" width="80" show-overflow-tooltip show-overflow-tooltip>
                    </el-table-column>
                    <el-table-column label="检验内容描述" prop="checkpointnotedis" width="80" show-overflow-tooltip
                      show-overflow-tooltip>
                      <template #default="scope">
                        <span v-html="scope.row.checkpointnotedis"></span>
                      </template>
                    </el-table-column>
                    <el-table-column label="图纸规定" prop="drawingrequiredis" width="100" show-overflow-tooltip>
                      <template #default="scope">
                        <span v-html="scope.row.drawingrequiredis"></span>
                      </template>
                    </el-table-column>
                    <el-table-column label="基准值" prop="basevalue" width="60" show-overflow-tooltip></el-table-column>
                    <el-table-column label="上偏差" prop="ceilfloat" width="60" show-overflow-tooltip></el-table-column>
                    <el-table-column label="下偏差" prop="floorfloat" width="60" show-overflow-tooltip></el-table-column>
                    <el-table-column label="工人录入实测值" prop="workcheckpointresultnotedis" width="80"
                      show-overflow-tooltip>
                      <template #default="scope">
                        <span v-html="scope.row.workcheckpointresultnotedis"></span>
                      </template>
                    </el-table-column>
                    <el-table-column label="检查手段" prop="checkmethod" width="60" show-overflow-tooltip></el-table-column>
                    <el-table-column label="录入次数" prop="inputnum" width="60" show-overflow-tooltip></el-table-column>
                    <el-table-column label="已录入次数" prop="inputcount" width="70" show-overflow-tooltip></el-table-column>
                    <el-table-column label="关键过程" prop="keycheckname" width="60" show-overflow-tooltip>
                    </el-table-column>
                    <el-table-column label="关键过程类型" prop="checktypename" width="80" show-overflow-tooltip>
                    </el-table-column>
                    <el-table-column label="工序检" prop="meopcheckname" width="60" show-overflow-tooltip>
                    </el-table-column>
                    <el-table-column label="质保单" prop="qualitycheckname" width="60" show-overflow-tooltip>
                    </el-table-column>
                    <el-table-column label="气泡号" prop="bubblenumber" width="60" show-overflow-tooltip></el-table-column>
                  </el-table>
                </el-tab-pane>
              </el-tabs>
            </el-col>
            <el-col :span="5">
              <el-tabs v-model="inputCheckResultObj.tabObj.childcontainer">
                <el-tab-pane label="子序号区域" name="childcontainer">
                  <el-table height="340" :data="inputCheckResultObj.childContainerList"
                    ref="inputCheckResultDialogChildContainerRef" stripe border
                    @selection-change="getStepCheckPointResult">
                    <el-table-column type="index" width="50"></el-table-column>
                    <el-table-column type="selection" width="40"></el-table-column>
                    <el-table-column label="子序号批次" prop="containername" show-overflow-tooltip></el-table-column>
                    <el-table-column label="子序号批次id" prop="containernameid" v-if="false"></el-table-column>
                  </el-table>
                </el-tab-pane>
              </el-tabs>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="24">
              <el-tabs v-model="inputCheckResultObj.tabObj.checkresult">
                <el-tab-pane label="已录入结果" name="checkresult">
                  <el-table height="300" :data="inputCheckResultObj.checkItemResultList"
                    ref="inputCheckResultDialogCheckResultTableRef" stripe border>
                    <el-table-column type="index" width="50"></el-table-column>
                    <el-table-column type="selection" width="40"></el-table-column>
                    <el-table-column label="检测项id" prop="stepcheckpointid" v-if="false"></el-table-column>
                    <el-table-column label="检测结果id" prop="stepcheckpointresultid" v-if="false"></el-table-column>
                    <el-table-column label="子批次" prop="childcontainername"></el-table-column>
                    <el-table-column label="工人实测值" prop="workcheckpointresultnotedis">
                      <template #default="scope">
                        <span v-html="scope.row.workcheckpointresultnotedis"></span>
                      </template>
                    </el-table-column>
                    <el-table-column label="工人实测值超差" prop="workerstatus" width="80">
                      <template #default="scope">
                        <el-tag type="danger" v-if="scope.row.workerstatus">是</el-tag>
                      </template>
                    </el-table-column>
                    <el-table-column label="录入时间" prop="createdate" width="160">
                      <template #default="scope">
                        <span v-if="scope.row.createdate"> {{scope.row.createdate.replace('T',' ')}}</span>
                      </template>
                    </el-table-column>
                    <el-table-column label="工人/三坐标" prop="worker" width="100"></el-table-column>
                    <el-table-column label="工人附件" prop="workresultdocname" width="80" show-overflow-tooltip>
                      <template #default="scope">
                        <div v-if="scope.row.workresultdocpath">
                          <el-link :href="scope.row.workresultdocpath" target="_blank" type="primary">查看</el-link>
                        </div>
                      </template>
                    </el-table-column>
                    <el-table-column label="检验实测值" prop="checkpointresultnotedis">
                      <template #default="scope">
                        <span v-html="scope.row.checkpointresultnotedis"></span>
                      </template>
                    </el-table-column>
                    <el-table-column label="录入时间" prop="checkdate" width="160">
                      <template #default="scope">
                        <span v-if="scope.row.checkdate"> {{scope.row.checkdate.replace('T',' ')}}</span>
                      </template>
                    </el-table-column>
                    <el-table-column label="检验员" prop="checker" width="80"></el-table-column>
                    <el-table-column label="检验附件" prop="checkresultdocname" width="80" show-overflow-tooltip>
                      <template #default="scope">
                        <div v-if="scope.row.checkresultdocpath">
                          <el-link :href="scope.row.checkresultdocpath" target="_blank" type="primary">查看</el-link>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table>
                </el-tab-pane>
              </el-tabs>
            </el-col>
          </el-row>
        </el-col>

        <el-col :span="6">
          <el-tabs v-model="inputCheckResultObj.tabObj.inputZone">
            <el-tab-pane label="填写区域" name="inputZone">
              <iframe src="../../../forms/Custom/htmlPage/StepCheckPoint/CheckPointSymbolInput.aspx" width="400px"
                height="320px" scrolling="no" id="inputCheckPointContent">
              </iframe>
              <div style="margin:10px 0;">
                <el-button type="primary" :icon="'Plus'" @click="handleCheckPointAddClick">增加</el-button>
                <el-button type="success" :icon="'Check'" @click="handleUpdateCheckPointValueClick">更新</el-button>
                <el-button type="danger" :icon="'Delete'" @click="deleteCheckPointResult">删除</el-button>
              </div>
              <div>
                <el-button type="warning" :icon="'Download'" @click="exportCheckPointResult">检测项导出</el-button>
                <el-button type="primary" :icon="'Promotion'" @click="sendToThreeCoordinateRecord">推送三坐标</el-button>
              </div>
              <el-tabs v-model="inputCheckResultObj.tabObj.importCheckPoint">
                <el-tab-pane label="检测项导入" name="importCheckPoint">
                  <el-upload :multiple="false" accept=".xls,.xlsx" ref="importCheckResultUploadRef"
                    v-model:file-list="inputCheckResultObj.checkResultImportfileList"
                    :action="inputCheckResultObj.action" :multiple="false" :auto-upload="false"
                    :on-success="handleCheckResultImportSuccess">
                    <template #trigger>
                      <el-button :size="'small'" type="primary" style="margin-right:10px;">选择文件</el-button>
                    </template>
                    <el-button :size="'small'" type="success" :icon="'Upload'" @click="importCheckPointResult">
                      确认并上传
                    </el-button>
                    <span style="color:red;font-weight:bold;margin-left: 10px;">内部系统，严禁上传涉密信息</span>
                    <template #tip>
                      <div style="margin-top:10px;">1. 只可导入Excel文件。</div>
                      <div>2. 请选择经【检测项导出】功能导出的Excel文件，不要修改表格模板，否则无法正常导入。</div>
                    </template>
                  </el-upload>
                </el-tab-pane>
              </el-tabs>
            </el-tab-pane>
          </el-tabs>
          <el-tabs v-model="inputCheckResultObj.tabObj.uploadZone">
            <el-tab-pane label="附件上传" name="uploadZone">
              <el-form @submit.prevent>
                <el-form-item label="范围:">
                  <el-select v-model="inputCheckResultObj.upload.type" placeholder="请选择">
                    <el-option :key="'公开'" :label="'公开'" :value="'公开'"></el-option>
                    <el-option :key="'内部'" :label="'内部'" :value="'内部'"></el-option>
                  </el-select>
                </el-form-item>
              </el-form>
              <el-upload :multiple="false" ref="fileUploadRef" v-model:file-list="inputCheckResultObj.fileUploadList"
                action="../../../Ashx/InputCheckPointResultVue3PageHandler.ashx?actions=uploadFile" :multiple="false"
                :auto-upload="false" :on-success="handleFileUploadSuccess" :data="inputCheckResultObj.fileUploadParams">
                <template #trigger>
                  <el-button :size="'small'" type="primary" style="margin-right:10px;">选择文件</el-button>
                </template>
                <el-button :size="'small'" type="success" :icon="'Upload'" @click="uploadFileSubmit">
                  确认并上传
                </el-button>
                <span style="color:red;font-weight:bold;margin-left: 10px;">内部系统，严禁上传涉密信息</span>
              </el-upload>
            </el-tab-pane>
          </el-tabs>
        </el-col>
      </el-row>
      <template #footer>
        <div class="dialog-footer">
          <el-button @click="inputCheckResultObj.dialogVisible = false" :icon="'Close'">关闭</el-button>
        </div>
      </template>
    </el-dialog>

    <!-- 待完成任务明细对话框 -->
    <el-dialog v-model="unReportWorkflowStepObj.dialogVisible" :title="unReportWorkflowStepObj.title" width="95%"
      :draggable="true" align-center>
      <el-table :data="unReportWorkflowStepObj.dataList" stripe border>
        <el-table-column type="index"></el-table-column>
        <el-table-column prop="worker" label="工人" width="80" show-overflow-tooltip></el-table-column>
        <el-table-column prop="mfgordername" label="订单号" width="120" show-overflow-tooltip></el-table-column>
        <el-table-column prop="factoryname" label="分厂" width="100" show-overflow-tooltip></el-table-column>
        <el-table-column prop="workcentername" label="工区" width="100" show-overflow-tooltip></el-table-column>
        <el-table-column prop="teamname" label="班组" width="100" show-overflow-tooltip></el-table-column>
        <el-table-column prop="resourcename" label="设备编号" width="100" show-overflow-tooltip></el-table-column>
        <el-table-column prop="containername" label="批次号" show-overflow-tooltip></el-table-column>
        <el-table-column prop="qty" label="数量" width="80" show-overflow-tooltip></el-table-column>
        <el-table-column prop="workflowstepname" label="派工工序" width="120" show-overflow-tooltip></el-table-column>
        <el-table-column prop="currentspec" label="当前工序" width="120" show-overflow-tooltip></el-table-column>
        <el-table-column prop="plannedstartdate" label="计划开始时间" width="100" show-overflow-tooltip>
          <template #default="scope">
            <span v-if="scope.row.plannedstartdate">{{scope.row.plannedstartdate.split('T')[0]}}</span>
          </template>
        </el-table-column>
        <el-table-column prop="plannedfinishdate" label="计划完成时间" width="100" show-overflow-tooltip>
          <template #default="scope">
            <span v-if="scope.row.plannedfinishdate">{{scope.row.plannedfinishdate.split('T')[0]}}</span>
          </template>
        </el-table-column>
        <el-table-column prop="receiver" label="领工人" width="80" show-overflow-tooltip></el-table-column>
        <el-table-column prop="recvdate" label="领工时间" width="100" show-overflow-tooltip>
          <template #default="scope">
            <span v-if="scope.row.recvdate">{{scope.row.recvdate.split('T')[0]}}</span>
          </template>
        </el-table-column>
        <el-table-column prop="status" label="状态" width="90" show-overflow-tooltip>
          <template #default="scope">
            <el-tag v-if="scope.row.status === '未领工'" type="info">{{scope.row.status}}</el-tag>
            <el-tag v-else>{{scope.row.status}}</el-tag>
          </template>
        </el-table-column>
        <el-table-column prop="receivestate" label="可领工" width="80" show-overflow-tooltip>
          <template #default="scope">
            <el-tag :type="scope.row.receivestate==='是'?'success':'danger'">{{scope.row.receivestate}}</el-tag>
          </template>
        </el-table-column>
        <el-table-column prop="reportstate" label="可报工" width="80" show-overflow-tooltip>
          <template #default="scope">
            <el-tag :type="scope.row.reportstate==='是'?'success':'danger'">{{scope.row.reportstate}}</el-tag>
          </template>
        </el-table-column>
      </el-table>
      <el-pagination style="margin-top: 10px;" background @size-change=""
        @current-change="handleUnReportWorkflowStepDetailCurrentChange"
        :current-page="unReportWorkflowStepObj.queryInfo.currentPage"
        :page-sizes="[unReportWorkflowStepObj.queryInfo.pageSize]"
        :page-size="unReportWorkflowStepObj.queryInfo.pageSize" layout="prev,pager,next,jumper,sizes,total"
        :total="unReportWorkflowStepObj.total">
      </el-pagination>
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="unReportWorkflowStepObj.dialogVisible = false">关闭</el-button>
        </span>
      </template>
    </el-dialog>

    <!-- NC附件查看对话框 -->
    <el-dialog v-model="ncProgramViewDialogVisible" title="NC附件查看对话框" width="95%" :draggable="true" align-center>
      <el-card style="padding:10px;margin-top:10px;">
        <template #header>
          <div style="display: flex;align-items: center;position: relative;">
            <el-icon class="card-header-icon" style="font-size: 20px;">
              <info-filled />
            </el-icon>
            <span class="card-header-text">件号NC程序列表</span>
          </div>
        </template>
        <el-table @row-click="getNCProgramDetail" :row-class-name="tableRowClassName" :data="ncProgramDataList" border
          ref="ncProgramDataListRef" height="300">
          <el-table-column type="index" width="50"></el-table-column>
          <el-table-column prop="id" label="id" v-if="false"></el-table-column>
          <el-table-column prop="productname" label="零件图号"></el-table-column>
          <el-table-column prop="productdesc" label="零件名称"></el-table-column>
          <el-table-column prop="process_no" label="工艺规程编号"></el-table-column>
          <el-table-column prop="process_rev" label="工艺规程版本"></el-table-column>
          <el-table-column prop="specno" label="工序号"></el-table-column>
          <el-table-column prop="nc_name" label="NC程序名称"></el-table-column>
          <el-table-column prop="nc_no" label="NC程序版本"></el-table-column>
          <el-table-column prop="control_type" label="NC程序系统"></el-table-column>
        </el-table>
      </el-card>

      <el-row :gutter="10">
        <el-col :span="12">
          <el-card style="padding:10px;margin-top:10px;">
            <template #header>
              <div style="display: flex;align-items: center;position: relative;">
                <el-icon class="card-header-icon" style="font-size: 20px;">
                  <info-filled />
                </el-icon>
                <span class="card-header-text">设备清单</span>
              </div>
            </template>
            <el-table :data="ncProgarmResourcesList" stripe border height="200">
              <el-table-column type="index" width="50"></el-table-column>
              <el-table-column prop="id" label="id" v-if="false"></el-table-column>
              <el-table-column prop="equip_code" label="设备编号"></el-table-column>
              <el-table-column prop="equip_xh" label="设备型号"></el-table-column>
            </el-table>
          </el-card>
        </el-col>
        <el-col :span="12">
          <el-card style="padding:10px;margin-top:10px;">
            <template #header>
              <div style="display: flex;align-items: center;position: relative;">
                <el-icon class="card-header-icon" style="font-size: 20px;">
                  <info-filled />
                </el-icon>
                <span class="card-header-text">附件清单</span>
              </div>
            </template>
            <el-table :data="ncProgarmFilesList" stripe border height="200">
              <el-table-column type="index" width="50"></el-table-column>
              <el-table-column prop="id" label="id" v-if="false"></el-table-column>
              <el-table-column label="附件名称" prop="filename">
                <template #default="scope">
                  <el-link type="primary" @click="handleOpenDocumentClick(scope.row.filepath)">{{scope.row.filename}}
                  </el-link>
                </template>
              </el-table-column>
            </el-table>
          </el-card>
        </el-col>
      </el-row>
    </el-dialog>

    <!-- 三定卡片查看对话框 -->
    <el-dialog v-model="threeCard.threeCardViewDialogVisible" title="三定卡片查看对话框" width="95%" :draggable="true"
      align-center>
      <el-card style="padding:10px;margin-top:10px;">
        <template #header>
          <div style="display: flex;align-items: center;position: relative;">
            <el-icon class="card-header-icon" style="font-size: 20px;">
              <info-filled />
            </el-icon>
            <span class="card-header-text">三定卡片列表</span>
          </div>
        </template>
        <el-table @row-click="getThreeCardDetail" :row-class-name="tableRowClassName"
          :data="threeCard.threeCardDataList" border height="300">
          <el-table-column type="index" width="50"></el-table-column>
          <el-table-column prop="id" label="id" v-if="false"></el-table-column>
          <el-table-column prop="productname" label="零件图号"></el-table-column>
          <el-table-column prop="productdesc" label="零件名称"></el-table-column>
          <el-table-column prop="workflowname" label="工艺规程编号"></el-table-column>
          <el-table-column prop="workflowversion" label="工艺规程版本"></el-table-column>
          <el-table-column prop="specno" label="工序号"></el-table-column>
          <el-table-column prop="cardcode" label="卡片编码"></el-table-column>
          <el-table-column prop="cardname" label="卡片名称"></el-table-column>
          <el-table-column prop="publishplant" label="发放单位"></el-table-column>
          <el-table-column prop="workcenter" label="工作中心"></el-table-column>
          <el-table-column prop="secret" label="密级"></el-table-column>
          <el-table-column prop="bmqx" label="保密期限"></el-table-column>
          <el-table-column prop="dmyj" label="定密依据" show-overflow-tooltip></el-table-column>
          <el-table-column prop="zxfw" label="知悉范围" show-overflow-tooltip></el-table-column>
        </el-table>
      </el-card>

      <el-row :gutter="10">
        <el-col :span="12">
          <el-card style="padding:10px;margin-top:10px;">
            <template #header>
              <div style="display: flex;align-items: center;position: relative;">
                <el-icon class="card-header-icon" style="font-size: 20px;">
                  <info-filled />
                </el-icon>
                <span class="card-header-text">设备清单</span>
              </div>
            </template>
            <el-table :data="threeCard.threeCardResourceList" stripe border height="200">
              <el-table-column type="index" width="50"></el-table-column>
              <el-table-column prop="id" label="id" v-if="false"></el-table-column>
              <el-table-column prop="code" label="设备编号"></el-table-column>
              <el-table-column prop="name" label="设备型号"></el-table-column>
            </el-table>
          </el-card>
        </el-col>
        <el-col :span="12">
          <el-card style="padding:10px;margin-top:10px;">
            <template #header>
              <div style="display: flex;align-items: center;position: relative;">
                <el-icon class="card-header-icon" style="font-size: 20px;">
                  <info-filled />
                </el-icon>
                <span class="card-header-text">附件清单</span>
              </div>
            </template>
            <el-table :data="threeCard.threeCardFileList" stripe border height="200">
              <el-table-column type="index" width="50"></el-table-column>
              <el-table-column prop="id" label="id" v-if="false"></el-table-column>
              <el-table-column label="附件名称" prop="name">
                <template #default="scope">
                  <el-link type="primary" @click="handleOpenDocumentClick(scope.row.code)">{{scope.row.name}}
                  </el-link>
                </template>
              </el-table-column>
            </el-table>
          </el-card>
        </el-col>
        <el-col :span="12">
          <el-card style="padding:10px;margin-top:10px;">
            <template #header>
              <div style="display: flex;align-items: center;position: relative;">
                <el-icon class="card-header-icon" style="font-size: 20px;">
                  <info-filled />
                </el-icon>
                <span class="card-header-text">操作工清单</span>
              </div>
            </template>
            <el-table :data="threeCard.threeCardWorkerList" stripe border height="200">
              <el-table-column type="index" width="50"></el-table-column>
              <el-table-column prop="id" label="id" v-if="false"></el-table-column>
              <el-table-column prop="code" label="员工工号"></el-table-column>
              <el-table-column prop="name" label="员工姓名"></el-table-column>
              <el-table-column prop="worktype" label="工作工位"></el-table-column>
            </el-table>
          </el-card>
        </el-col>
        <el-col :span="12">
          <el-card style="padding:10px;margin-top:10px;">
            <template #header>
              <div style="display: flex;align-items: center;position: relative;">
                <el-icon class="card-header-icon" style="font-size: 20px;">
                  <info-filled />
                </el-icon>
                <span class="card-header-text">检验员清单</span>
              </div>
            </template>
            <el-table :data="threeCard.threeCardCheckerList" stripe border height="200">
              <el-table-column type="index" width="50"></el-table-column>
              <el-table-column prop="id" label="id" v-if="false"></el-table-column>
              <el-table-column prop="code" label="员工工号"></el-table-column>
              <el-table-column prop="name" label="员工姓名"></el-table-column>
              <el-table-column prop="worktype" label="工作工位"></el-table-column>
            </el-table>
          </el-card>
        </el-col>
      </el-row>
    </el-dialog>
  </div>

  <script type="module">
    const { createApp, reactive, ref, toRef, toRefs, onMounted, watch } = Vue
    const { ElMessage, ElLoading, ElMessageBox, ElNotification } = ElementPlus
    import { useFetch } from '../../../Scripts/hooks/useFetch.js';
    import { splitDate } from '../../../Scripts/utils/format.js';
    import { getChildContainerData } from '../../../Scripts/hooks/workreport/useChildContainer.js';
    import { usePageHeightSet } from '../../../Scripts/hooks/workreport/usePageHeightSet.js';
    import { useFetchMethods } from '../../../Scripts/hooks/workreport/useFetchMethods.js';
    import { useCommon } from '../../../Scripts/hooks/useCommon.js';
    import { useGetUserInfo } from '../../../Scripts/hooks/useGetUserInfo.js';
    import { useUserRoles } from '../../../Scripts/hooks/useUserRoles.js';
    import { getParams } from '../../../Scripts/utils/common.js';
    import { useYPFirstContainerCheck } from '../../../Scripts/hooks/workreport/useYPFirstContainerCheck.js';
    import { useDocumentView } from '../../../Scripts/hooks/workreport/useDocumentView.js';
    import { useMESFeedback } from '../../../Scripts/hooks/workreport/useMESFeedback.js';
    import { useWorkTime } from '../../../Scripts/hooks/workreport/useWorkTime.js';
    import { useEmployeeWorkdate } from '../../../Scripts/hooks/workreport/useEmployeeWorkdate.js';
    import { useSurpassbill } from '../../../Scripts/hooks/workreport/useSurpassbill.js';
    import { useResourceStatusMaint } from '../../../Scripts/hooks/workreport/useResourceStatusMaint.js';
    import { useCollectInfo } from '../../../Scripts/hooks/workreport/useCollectInfo.js';
    import { useUnCheckContainer } from '../../../Scripts/hooks/workreport/useUnCheckContainer.js';
    import { useUnReceiveData } from '../../../Scripts/hooks/workreport/useUnReceiveData.js';
    import { useUnReportData } from '../../../Scripts/hooks/workreport/useUnReportData.js';
    import { useQtyChangeBlur } from '../../../Scripts/hooks/workreport/useQtyChangeBlur.js';
    import { useBomView } from '../../../Scripts/hooks/workreport/useBomView.js';
    import { useContainerView } from '../../../Scripts/hooks/workreport/useContainerView.js';
    import { useInputCheckResult } from '../../../Scripts/hooks/workreport/useInputCheckResult.js';
    import { useNCProgramView } from '../../../Scripts/hooks/workreport/useNCProgramView.js';
    import { useThreeCard } from '../../../Scripts/hooks/productworkflow/useThreeCard.js';

    const App = {
      setup() {
        const baseAPI = '../../../Ashx/ContainerStepWorkReportVue3PageHandler.ashx';
        const FetchCommonUrl = '../../../Ashx/FetchCommonHandler.ashx';

        let currentTime = ref('');// 当前时间
        let timeoutTime = ref(Decrypt(getParams('duration')));// 超时时间
        // 页面布局高度配置
        const { clientHeight, inputHeight, tableHeight } = usePageHeightSet();

        const {
          factoryUserattributeList,// 分厂配置项列表
          uomList,// 单位uom列表
          getFactoryUserattributes,// 查询分厂配置项api接口方法
          getUomList,// 查询uom单位api接口方法
        } = useCommon();

        // 页面表单及刷新按钮控制
        let pageObj = reactive({
          userInfoBtnFlushDisabled: false,//排班及工时禁用
          taskInfoBtnFlushDisabled: false,//待报工、待领工禁用
          containerScanDisabled: false,//扫卡禁用
          reportDataEditDisabled: true,//报工信息录入禁用
          feedBackDisabled: false,//问题快反禁用
          resourceStatusDisabled: false, //设备状态录入禁用
          reportTypeTabsDisabled: true,//报工类型tabs禁用
          containerInfoTabsDisabled: true,//子批次、集件信息、待检验信息tabs禁用
          selfCheckLossQtyDisabled: false,// 自检报废数禁用
        });

        // 页面右下区域按钮控制
        let btnsConfig = reactive({
          receiveBtnDisabled: false,//领工按钮 是否禁用
          reportBtnDisabled: false,//报工按钮 是否禁用
          documentViewBtnDisabled: false,//工艺查看 是否禁用
          containerViewBtnDisabled: false,//流卡预览 是否禁用
          bomViewBtnDisabled: false,//配套表查看 是否禁用
          surpassbillBtnDisabled: false,//超越单查看 是否禁用
          checkPointBtnDisabled: false,//实测值录入 是否禁用
          mesFeedbackBtnDisabled: false,//问题快反 是否禁用
          resourceStatusBtnDisabled: false//设备状态录入 是否禁用
        });

        // 勾选的批次信息
        let containerInfo = reactive({
          mfgordername: '',//订单号
          productdescription: '',//零件名称
          containertypename: '',//批次卡类型
          togetherflag: '',//件号/批次号
          wipqty: '',//在制总数
          wipqty2: '',//在制总数（仅用来显示，不做逻辑计算）
          specno: '',//当前工序号
          nowworkflowstepname: '',//当前工序
          plannedstartdate: '',//计划开始时间
          plannedfinishdate: '',//计划完成时间
          dispatchEmp: '',//派工人
          dispatchDate: '',//派工时间
          dispatchQty: '',//派工数
          reportedQty: '',//已报工数
          lossedQty: '',//已报废数
          receiveemp: '',//领工人
          receivedate: ''//领工时间
        });

        // 报工数据
        let reportDataInfo = reactive({
          selfCheckPassQty: 0,// 自检合格数
          selfCheckDefeatQty: 0,// 自检超差数
          selfCheckLossQty: 0,// 自检报废数
          resourceid: '',// 报工设备
          surPlusEmployeeID: '',// 结余件确认人id
          surPlusEmployeeName: '',// 结余件确认人
          surPlusEmployeeCardNo: '',//结余件确认人
          Qty2: '',// 备注一(数量)
          UOM2ID: '',// 备注二(单位)
          INMTQty: 0,// 试件数
          INMTLossQty: 0,// 试件废票数
          firstcheckcontainerno: '',// 首件批次号
          KeyProcessBatchNo: '',// 关键过程批次号
          notes: '',// 备注
          Checker: ''// 检验员
        });

        const { resourceList, getDispatchAndReportInfo, getResourceList } = useFetchMethods();
        const { userInfo, getUserInfo } = useGetUserInfo();
        const { userList: checkerList, getFactoryUsersByRoleName } = useUserRoles();
        const {
          childContainerList, // 子序号批次表格
          childContainerTableRef,// 页面 【子批次号】ref引用
          getContainerType7List, // 查询单件单卡批次数据
          getContainerType3List // 查询单件带子序号批次数据
        } = getChildContainerData();

        // 文档查看
        const {
          documentViewDialogVisible,
          treeData,//文档查看Tree数据
          documentList,//文档查看文件清单
          getDocumentViewTreeData,
          getDocumentList,
          downloadFile,
        } = useDocumentView();

        // 员工工时
        const {
          worktime,//员工工时
          getWorkerWorkTime
        } = useWorkTime();

        // 人员排班信息
        const {
          employeeWorkDate,// 排班信息
          getEmployeeWorkdate
        } = useEmployeeWorkdate();

        // 叶片首件批次号
        const {
          firstCheckDialogVisible,
          checkedContainerNoListTableRef,
          currentContainerNoListTableRef,
          checkedContainerNoList,
          currentContainerNoList,
          getFirstContainerData,
          setFirstContainer
        } = useYPFirstContainerCheck();

        // 超越单
        const {
          surpassbillDialogVisible,
          surpassbillInfoList,
          surpassDocList,
          getSurpassbillInfo
        } = useSurpassbill();

        // 设备状态录入
        const {
          resourceStatus,
          resourceStatusMaintDialogVisible,
          resourceStatusList,
          resourceStatusListRef,
          getResourceStatusListData,
          setResourceStatus,
          resourceStatusConfirm,//设备状态录入确认
        } = useResourceStatusMaint();

        // 实测值录入
        const {
          inputCheckResultObj,
          initInputCheckResultDialogData,
          inputCheckResultDialogChildContainerRef,//子序号批次表格ref
          inputCheckResultDialogCheckItemTableRef,//检测项表格ref
          inputCheckResultDialogCheckResultTableRef,//检测项结果表格ref
          importCheckResultUploadRef,//检查项导入ref
          getStepCheckPointResult,//查询检测项录入结果
          handleCheckPointAddClick,//【增加】按钮点击
          handleUpdateCheckPointValueClick,//【保存】按钮点击
          deleteCheckPointResult,//删除检测项
          exportCheckPointResult,//导出检测项
          importCheckPointResult,//导入检测项
          handleCheckResultImportSuccess,//检测项导入成功事件
          checkItemRowClick,//检测项row点击事件
          sendToThreeCoordinateRecord,//推送三坐标
          fileUploadRef,//文件上传ref
          handleFileUploadSuccess,//文件上传成功事件
          uploadFileSubmit,//文件上传提交
        } = useInputCheckResult();

        // 集件信息
        const {
          collectInfoList,//集件信息表格数据
          getCollectInfo
        } = useCollectInfo();

        // 配套表查看
        const { openBomViewPage } = useBomView();

        // 流卡预览
        const { openContainerViewPage } = useContainerView();

        // 问题快反
        const { getMESFeedBackData } = useMESFeedback();

        // 各报工数量校验
        const {
          checkSelfCheckPassQty,//校验【自检合格数】
          checkSelfCheckDefeatQty, //校验【自检超差数】
          checkSelfCheckLossQty,//校验【自检报废数】
          checkINMTQty,//校验【试件数】
          checkINMTLossQty,//校验【试件废票数】
          setSurPlusEmployeeInfo,//结余件确认人刷卡
        } = useQtyChangeBlur();

        // 待接收
        const {
          notReceivedList,//【待接收】数据
          unReceiveDataRows,//【待接收】总数
          getUnReceivedData,//查询待接收数据
        } = useUnReceiveData();

        // 待报工
        const {
          notReportedList,//【待报工】数据
          unReportDataRows,//【待报工】总数
          getUnReportedData,//查询待报工数据
        } = useUnReportData();

        // 待检验
        const {
          unCheckContainerData,//【待检验】数据
          unCheckContainerCount,//【待检验】总数
          unCheckDetailList,//【待检验信息】表格数据
          unCheckDetailListRef,//【待检验信息】表格ref引用
          getUnCheckContainerDataList,
          getUnCheckDetailsList
        } = useUnCheckContainer();

        // NC附件查看
        const {
          ncProgramViewDialogVisible,
          ncProgramDataList,//数控程序清单
          getNCProgramData,
          getNCProgramDetail,
          tableRowClassName,
          ncProgarmResourcesList,//设备清单
          ncProgarmFilesList,//附件清单
        } = useNCProgramView();

        // 主界面勾选的批次
        let currentSelectContainer = {};
        // 当前勾选的选项卡名称
        let activeMenuName = '';
        let currentSubMenuItemName = ref('');

        // 扫卡信息
        let searchObj = reactive({
          containername: '',
          productname: '',
          togetherflag: '',
          workflowstepid: '',
          containertype: '',
          mfgordername: '',
        });


        // 菜单ref引用
        const menuDataRef = ref(null);

        let reportType = ref('其他');//报工类型
        let reportZone = ref('报工区域');
        let tabIndex = ref('子批次号');// 右侧选项卡当前选中索引

        // 分厂配置项
        const factoryUserattributesConfig = reactive({
          isWorkerChoseChecker: false,//报工时是否选择检验员
          isWorkerCheckSelf: false, //报工时是否自检
        });

        let unReportWorkflowStepCount = ref(0);//待完成任务数
        let unReportWorkflowStepObj = reactive({
          title: `待完成任务明细`,
          dialogVisible: false,
          dataList: [],
          queryInfo: { containername: '', pageSize: 15, currentPage: 1 },
          total: 0
        });

        // 刷新员工信息数据
        async function handleUserInfoFlushClick() {
          const { employeeid } = userInfo.value;
          await getEmployeeWorkdate({ url: `${baseAPI}`, method: 'getEmployeeWorkdate', employeeid });// 1.查询排班信息
          await getWorkerWorkTime({ url: `${baseAPI}`, method: 'getWorkerWorkTime', employeeid, day: dayjs().format('D') });// 2.查询工时
        }

        // 扫卡事件
        async function handleContainerSearchBlur() {
          if (searchObj.containername) {
            const config = {
              url: `${baseAPI}?actions=getScanContainerData`,
              data: {
                type: 'getScanContainerData',
                searchText: searchObj.containername
              }
            };
            const { data, total, status } = await useFetch(config);
            if (total.value === 0) {
              for (const key in searchObj) {
                searchObj[key] = '';
              }
              return ElMessage({ type: 'error', message: status.msg, grouping: true });
            }
            Object.assign(searchObj, { ...data.value[0] });
          } else {
            for (const key in searchObj) {
              searchObj[key] = '';
            }
          }
          menuDataRef.value.close(activeMenuName);
          handleTaskFlush();
        }

        // 查询待完成任务数明细
        async function getUnReportWorkflowStepDetail() {
          unReportWorkflowStepObj.dialogVisible = true;
          unReportWorkflowStepObj.title = `【${userInfo.value.fullname}】待完成任务明细`;
          const { data, total, status: { code, msg } } = await useFetch({
            url: `${baseAPI}?actions=getUnReportWorkflowStepDetail`,
            data: {
              type: 'getUnReportWorkflowStepDetail',
              factoryid: userInfo.value.factoryid,
              workerid: userInfo.value.employeeid,
              workername: userInfo.value.fullname,
              ...unReportWorkflowStepObj.queryInfo,
              containername: searchObj.containername
            }
          });
          unReportWorkflowStepObj.dataList = data.value;
          unReportWorkflowStepObj.total = total.value;
        }

        // 待完成任务按钮点击
        function handleUnReportWorkflowStepCountClick() {
          unReportWorkflowStepObj.queryInfo.currentPage = 1;
          getUnReportWorkflowStepDetail();
        }

        // 待完成任务明细分页事件
        function handleUnReportWorkflowStepDetailCurrentChange(newPage) {
          unReportWorkflowStepObj.queryInfo.currentPage = newPage;
          getUnReportWorkflowStepDetail();
        }

        // 刷新员工信息数据
        async function handleUserInfoFlushClick() {
          const { employeeid } = userInfo.value;
          await getEmployeeWorkdate({ url: `${baseAPI}`, method: 'getEmployeeWorkdate', employeeid });// 1.查询排班信息
          await getWorkerWorkTime({ url: `${baseAPI}`, method: 'getWorkerWorkTime', employeeid, day: dayjs().format('D') });// 2.查询工时
        }

        // 设置按钮禁用状态
        function setBtnDisabledState(munuName) {
          if (munuName === '待领工') {
            btnsConfig.receiveBtnDisabled = false;
            btnsConfig.reportBtnDisabled = true;//待领工时，禁用【待报工】按钮
            pageObj.reportTypeTabsDisabled = true;//报工类型tabs禁用
            pageObj.reportDataEditDisabled = true;//报工表单禁用
            pageObj.containerInfoTabsDisabled = true;//子批次号、集件信息、待检验信息等tabs禁用
          }
          if (munuName === '待报工') {
            btnsConfig.receiveBtnDisabled = true;//待报工时，禁用【待领工】按钮
            btnsConfig.reportBtnDisabled = false;
            pageObj.reportTypeTabsDisabled = false;//报工类型tabs取消禁用
            pageObj.reportDataEditDisabled = false;//报工表单取消禁用
            pageObj.containerInfoTabsDisabled = false;//子批次号、集件信息、待检验信息等tabs取消禁用
          }
          if (munuName === '待检验') {
            btnsConfig.receiveBtnDisabled = true;//待检验时，禁用【待领工】按钮
            btnsConfig.reportBtnDisabled = true;//待检验时，禁用【待报工】按钮
            pageObj.reportTypeTabsDisabled = true;//报工类型tabs禁用
            pageObj.reportDataEditDisabled = true;//报工表单禁用
            pageObj.containerInfoTabsDisabled = false;//子批次号、集件信息、待检验信息等tabs取消禁用
          }
        }

        // menu选择事件
        async function menuSelect(key, keyPath) {
          const [munuName, productbatch, workflowstepid] = key.split('&');
          resetData();//先清空用户输入内容
          setBtnDisabledState(munuName);
          activeMenuName = munuName;
          currentSubMenuItemName.value = munuName;
          switch (munuName) {
            case "待领工":
              tabIndex.value = '子批次号';//tab默认显示子批次号信息
              loadUnReceiveData(productbatch, munuName, workflowstepid);//查询待领工信息
              break;
            case "待报工":
              tabIndex.value = '子批次号';//tab默认显示子批次号信息
              loadUnReportData(productbatch, munuName, workflowstepid);//查询待报工信息
              break;
            case "待检验":
              tabIndex.value = '待检验信息';//tab默认显示待检验信息
              loadUnCheckData(productbatch, munuName, workflowstepid);//查询待检验信息
              break;
            default:
              break;
          }
        }

        // 1.加载【待领工】相关数据
        async function loadUnReceiveData(productbatch, munuName, workflowstepid) {
          currentSelectContainer = notReceivedList.value.filter(i => i.productbatch === productbatch && i.workflowstepid === workflowstepid)[0];
          // 把当前选中的批次信息缓存起来
          Object.assign(containerInfo, { ...currentSelectContainer });
          containerInfo.wipqty2 = currentSelectContainer.wipqty;
          // 计划开始时间、计划完成时间 显示截取后的格式
          containerInfo.plannedstartdate = splitDate(containerInfo.plannedstartdate);
          containerInfo.plannedfinishdate = splitDate(containerInfo.plannedfinishdate);

          let dispatchid = '';//派工id
          let selectContainerid = '';//批次id

          // 单件单卡
          if (containerInfo.containertype === 7) {
            containerInfo.wipqty = 1;// 单件单卡在制总数显示为1
            // 单件单卡 查询并绑定页面【子批次号】区域表格数据
            const data = await getContainerType7List({
              url: `${baseAPI}`,
              method: 'getContainerType7List',
              ...currentSelectContainer,
              factoryid: userInfo.value.factoryid,
              workerid: userInfo.value.employeeid,
              queryType: munuName
            });
            if (data.length > 0) {
              // 取单件单卡第一条记录信息
              const { containerstepdispatchid, containerid, plannedstartdate, plannedfinishdate, bomid } = data[0];
              // 单件单卡，主查询结果因不含计划开始时间、计划完成时间等信息，因此这里处理一下。
              containerInfo.plannedstartdate = splitDate(plannedstartdate);// 计划开始时间
              containerInfo.plannedfinishdate = splitDate(plannedfinishdate);// 计划完成时间
              containerInfo.containerstepdispatchid = containerstepdispatchid;
              currentSelectContainer.bomid = bomid;
              dispatchid = containerstepdispatchid;// 派工id：取第一行数据中的派工id
              selectContainerid = containerid;// 批次id：取第一行数据中的批次id
              // 默认只勾选搜索框所选择的批次
              if (searchObj.containername) {
                const row = childContainerList.value.filter(i => i.containername === searchObj.containername);
                if (row.length > 0) {
                  childContainerTableRef.value.toggleRowSelection(row[0], undefined);
                }
              } else {
                childContainerTableRef.value.toggleAllSelection();//默认全选
              }
            }
            reportDataInfo.selfCheckPassQty = 1;//自检合格数默认为1
          }

          // 子序号批次
          if (containerInfo.containertype === 3) {
            // 查询单件带子序号批次
            await getContainerType3List({
              url: `${baseAPI}`,
              method: 'getContainerType3List',
              parentcontainerid: containerInfo.containerid
            });

            dispatchid = containerInfo.containerstepdispatchid;// 派工id取主界面查询的派工id
            selectContainerid = containerInfo.containerid;
          }

          // 数量批
          if (containerInfo.containertype === 2) {
            childContainerList.value = [];// 数量批，清除页面【子批次号】区域表格数据
            dispatchid = containerInfo.containerstepdispatchid;// 派工id取主界面查询的派工id
            selectContainerid = containerInfo.containerid;
          }

          //查询：派工时间、派工数、派工人、已报工数
          const disPatchInfo = await getDispatchAndReportInfo({
            url: `${baseAPI}`,
            method: 'getDispatchAndReportInfo',
            containerstepdispatchid: dispatchid,
            workerid: userInfo.value.employeeid
          });

          //页面绑定：派工时间、派工数、派工人、已报工数
          if (disPatchInfo.length > 0) {
            const { fullname, createdate, reportqty, qty, lossqty } = disPatchInfo[0];
            containerInfo.dispatchEmp = fullname;
            containerInfo.dispatchDate = splitDate(createdate);
            containerInfo.dispatchQty = qty;
            containerInfo.reportedQty = reportqty;
            containerInfo.lossedQty = lossqty;
          }

          // 查询工序设备并绑定
          await getResourceList({
            url: `${baseAPI}`,
            method: 'getResourceList',
            containerid: selectContainerid,
            workflowstepid
          });
          if (resourceList.value.length > 0) {
            reportDataInfo.resourceid = resourceList.value[0].resourceid;
          }

          // 查询集件信息
          if (currentSelectContainer.bomid) {
            await getCollectInfo({
              url: `${baseAPI}`,
              method: 'getCollectInfo',
              postData: [currentSelectContainer]
            });
          } else {
            collectInfoList.value = [];
          }
        }

        // 2.加载【待报工】相关数据
        async function loadUnReportData(productbatch, munuName, workflowstepid) {
          currentSelectContainer = notReportedList.value.filter(i => i.productbatch === productbatch && i.workflowstepid === workflowstepid)[0];
          // 把当前选中的批次信息缓存起来
          Object.assign(containerInfo, { ...currentSelectContainer });
          containerInfo.wipqty2 = currentSelectContainer.wipqty;
          pageObj.selfCheckLossQtyDisabled = false;// 先解除【自检报废数】禁用

          // 计划开始时间、计划完成时间 显示截取后的格式
          containerInfo.plannedstartdate = splitDate(containerInfo.plannedstartdate);
          containerInfo.plannedfinishdate = splitDate(containerInfo.plannedfinishdate);

          let dispatchid = '';//派工id
          let selectContainerid = '';//批次id

          // 单件单卡
          if (containerInfo.containertype === 7) {
            containerInfo.wipqty = 1;// 单件单卡在制总数显示为1
            // 单件单卡 查询并绑定页面【子批次号】区域表格数据
            const data = await getContainerType7List({
              url: `${baseAPI}`,
              method: 'getContainerType7List',
              ...currentSelectContainer,
              factoryid: userInfo.value.factoryid,
              workerid: userInfo.value.employeeid,
              queryType: munuName
            });
            if (data.length > 0) {
              // 取单件单卡第一条记录信息
              const { containerstepdispatchid, containerid, plannedstartdate, plannedfinishdate, receiveemp, receivedate, bomid } = data[0];
              // 单件单卡，主查询结果因不含计划开始时间、计划完成时间等信息，因此这里处理一下。
              containerInfo.plannedstartdate = splitDate(plannedstartdate);// 计划开始时间
              containerInfo.plannedfinishdate = splitDate(plannedfinishdate);// 计划完成时间
              containerInfo.containerstepdispatchid = containerstepdispatchid;// 派工id
              containerInfo.receiveemp = receiveemp;//领工人
              containerInfo.receivedate = splitDate(receivedate);//领工时间
              currentSelectContainer.bomid = bomid;

              dispatchid = containerstepdispatchid;// 派工id：取第一行数据中的派工id
              selectContainerid = containerid;// 批次id：取第一行数据中的批次id
              // 默认只勾选搜索框所选择的批次
              if (searchObj.containername) {
                const row = childContainerList.value.filter(i => i.containername === searchObj.containername);
                if (row.length > 0) {
                  childContainerTableRef.value.toggleRowSelection(row[0], undefined);
                }
              } else {
                childContainerTableRef.value.toggleAllSelection();//默认全选
              }
            }
            reportDataInfo.selfCheckPassQty = 1;//自检合格数默认为1
          }

          // 子序号批次
          if (containerInfo.containertype === 3) {
            // 查询单件带子序号批次
            await getContainerType3List({
              url: `${baseAPI}`,
              method: 'getContainerType3List',
              parentcontainerid: containerInfo.containerid
            });
            dispatchid = containerInfo.containerstepdispatchid;// 派工id取主界面查询的派工id
            selectContainerid = containerInfo.containerid;
            containerInfo.receivedate = splitDate(containerInfo.receivedate);//截取领工时间
            pageObj.selfCheckLossQtyDisabled = true;// 子序号批次禁用【自检报废数】输入框
          }

          // 数量批
          if (containerInfo.containertype === 2) {
            childContainerList.value = [];// 数量批，清除页面【子批次号】区域表格数据
            dispatchid = containerInfo.containerstepdispatchid;// 派工id取主界面查询的派工id
            selectContainerid = containerInfo.containerid;
            containerInfo.receivedate = splitDate(containerInfo.receivedate);//截取领工时间
          }

          //查询：派工时间、派工数、派工人、已报工数
          const disPatchInfo = await getDispatchAndReportInfo({
            url: `${baseAPI}`,
            method: 'getDispatchAndReportInfo',
            containerstepdispatchid: dispatchid,
            workerid: userInfo.value.employeeid
          });

          //页面绑定：派工时间、派工数、派工人、已报工数
          if (disPatchInfo.length > 0) {
            const { fullname, createdate, reportqty, qty, lossqty } = disPatchInfo[0];
            containerInfo.dispatchEmp = fullname;
            containerInfo.dispatchDate = splitDate(createdate);
            containerInfo.dispatchQty = qty;
            containerInfo.reportedQty = reportqty;
            containerInfo.lossedQty = lossqty;
          }

          // 查询工序设备并绑定
          await getResourceList({
            url: `${baseAPI}`,
            method: 'getResourceList',
            containerid: selectContainerid,
            workflowstepid
          });
          if (resourceList.value.length > 0) {
            reportDataInfo.resourceid = resourceList.value[0].resourceid;
          }

          // 查询集件信息
          if (currentSelectContainer.bomid) {
            await getCollectInfo({
              url: `${baseAPI}`,
              method: 'getCollectInfo',
              postData: [currentSelectContainer]
            });
          } else {
            collectInfoList.value = [];
          }
        }

        // 3.加载【待检验】相关数据
        async function loadUnCheckData(productbatch, munuName, workflowstepid) {
          currentSelectContainer = unCheckContainerData.value.filter(i => i.productbatch === productbatch && i.workflowstepid === workflowstepid)[0];
          Object.assign(containerInfo, { ...currentSelectContainer });
          const { productbatch: togetherflag, mfgordername, productid, wipqty } = currentSelectContainer;
          // 查询待检验明细数据
          const data = await getUnCheckDetailsList({
            url: `${baseAPI}`,
            method: 'getUnCheckDetailInfo',
            productbatch: togetherflag,
            mfgordername, productid, workflowstepid,
            workerid: userInfo.value.employeeid,
            factoryid: userInfo.value.factoryid
          });

          const {
            workflowstepname, productdescription,
            plannedstartdate, plannedfinishdate, dispatchdate, dispatchemp, dispatchqty, recvdate, recvemp
          } = data[0];

          containerInfo.wipqty2 = wipqty;
          containerInfo.nowworkflowstepname = workflowstepname;
          containerInfo.productdescription = productdescription;
          containerInfo.plannedstartdate = splitDate(plannedstartdate);
          containerInfo.plannedfinishdate = splitDate(plannedfinishdate);
          containerInfo.dispatchEmp = dispatchemp;
          containerInfo.dispatchDate = splitDate(dispatchdate);
          containerInfo.dispatchQty = dispatchqty;
          containerInfo.receiveemp = recvemp;
          containerInfo.receivedate = splitDate(recvdate);
          containerInfo.reportedQty = data.reduce((current, item) => current + parseInt(item.reportqty), 0);//已报总数

          // 默认只勾选搜索框所选择的批次
          if (searchObj.containername) {
            const row = unCheckDetailList.value.filter(i => i.containername === searchObj.containername);
            if (row.length > 0) {
              unCheckDetailListRef.value.toggleRowSelection(row[0], undefined);
            }
          } else {
            unCheckDetailListRef.value.toggleAllSelection();//默认全选
          }
        }

        // 4.加载【待完成任务】总数
        async function getUnReportWorkflowStepCount() {
          const { data, status: { code, msg } } = await useFetch({
            url: `${baseAPI}?actions=getUnReportWorkflowStepCount`,
            data: {
              type: 'getUnReportWorkflowStepCount',
              factoryid: userInfo.value.factoryid,
              workerid: userInfo.value.employeeid,
              workername: userInfo.value.fullname,
              ...searchObj
            }
          });
          unReportWorkflowStepCount.value = data.value.length;
        }

        // 重置报工录入数据
        function resetData() {
          reportDataInfo.selfCheckPassQty = 0;
          reportDataInfo.selfCheckDefeatQty = 0;
          reportDataInfo.selfCheckLossQty = 0;
          reportDataInfo.resourceid = '';
          reportDataInfo.surPlusEmployeeID = '';
          reportDataInfo.surPlusEmployeeName = '';
          reportDataInfo.commentsFirst = '';
          reportDataInfo.UOMField = '';
          reportDataInfo.INMTQty = 0;
          reportDataInfo.INMTLossQty = 0;
          reportDataInfo.firstcheckcontainerno = '';
          reportDataInfo.KeyProcessBatchNo = '';
          reportDataInfo.notes = '';
          reportDataInfo.Checker = '';

          childContainerList.value = [];//清空【子批次】表格数据
          unCheckDetailList.value = [];//清空【待检验信息】表格数据
          collectInfoList.value = [];//清空【集件信息表格】表格数据
          // 清空所勾选的批次信息
          for (const key in containerInfo) {
            containerInfo[key] = '';
          }
        }

        // 子批次表格选择变更
        function handleSelectionChange() {
          if (containerInfo.containertype === 3) {
            // 单件带子序号批，自检合格数 = 勾选的子序号条目数
            reportDataInfo.selfCheckPassQty = childContainerTableRef.value.getSelectionRows().length
          }
        };

        // 日期字符串截取
        function dateFormatter(row, column, cellValue, index) {
          return cellValue && cellValue.includes('T') ? cellValue.split('T')[0] : cellValue;
        }

        // 刷新待领工、待报工、待检验数据
        async function handleTaskFlush() {
          resetData();
          // 查询待领工数据
          getUnReceivedData({
            url: `${baseAPI}`,
            method: 'getUnReceivedData',
            factoryid: userInfo.value.factoryid,
            workerid: userInfo.value.employeeid,
            ...searchObj,//页面扫卡信息
          });
          // 查询待报工数据
          getUnReportedData({
            url: `${baseAPI}`,
            method: 'getUnReportedData',
            factoryid: userInfo.value.factoryid,
            workerid: userInfo.value.employeeid,
            ...searchObj,//页面扫卡信息
          });
          // 查询待检验数据
          getUnCheckContainerDataList({
            url: `${baseAPI}`,
            method: 'getUnCheckData',
            factoryid: userInfo.value.factoryid,
            workerid: userInfo.value.employeeid,
            ...searchObj//页面扫卡信息
          });
          // 查询待完成任务数
          getUnReportWorkflowStepCount();
        }

        // 报工数据校验
        async function validateReport() {
          const selfCheckPassQty = parseInt(reportDataInfo.selfCheckPassQty);//自检合格数
          const selfCheckDefeatQty = parseInt(reportDataInfo.selfCheckDefeatQty);//自检超差数
          const selfCheckLossQty = parseInt(reportDataInfo.selfCheckLossQty);//自检报废数
          const reportQty = selfCheckPassQty + selfCheckDefeatQty + selfCheckLossQty;// 报工数：自检合格数 + 自检超差数 + 自检报废数

          const reportedQty = parseInt(containerInfo.reportedQty);//已报工数
          const lossedQty = containerInfo.lossedQty;//已报废数
          const restQty = parseInt(containerInfo.wipqty) - (reportedQty - lossedQty);// 剩余可报数：在制数 - 已报工数 - 已报废数
          const INMTQty = parseInt(reportDataInfo.INMTQty);//试件数
          const INMTLossQty = parseInt(reportDataInfo.INMTLossQty);//试件废票数
          const testReportQty = INMTQty + INMTLossQty;// 试件报工数
          if ((reportDataInfo.Qty2 && !reportDataInfo.UOM2ID)
            || (!reportDataInfo.Qty2 && reportDataInfo.UOM2ID)) {
            ElMessage({ type: 'error', message: '【备注一】和【备注二】状态不一致，要么都不填，要么都填。', grouping: true });
            return false;
          }

          // 没有填试件报工，报工数不能为0
          if (testReportQty === 0 && reportQty === 0) {
            ElMessage({ type: 'error', message: `报工数必须大于0`, grouping: true });
            return false;
          }

          if (containerInfo.containertype !== 2 && reportQty > restQty) {
            ElMessage({ type: 'error', message: `报工数不能大于${restQty}`, grouping: true });
            return false;
          }

          if (reportType.value === '首件') {
            if (containerInfo.firstchecknum) {
              ElMessage({ type: 'error', message: `批次已进行过首件报工，首件不允许重复报工`, grouping: true });
              return false;
            }

            if (reportQty !== 1) {
              ElMessage({ type: 'error', message: `首件报工数量有且只能为1`, grouping: true });
              return false;
            }
            // 叶片分厂，首件报工时必须指定【首件批次号】
            if (userInfo.value.factorycode === '608' && !reportDataInfo.firstcheckcontainerno) {
              ElMessage({ type: 'error', message: `首件报工需指定首件批次号`, grouping: true });
              return false;
            }
          }

          if (reportType.value === '返修') {
            if (reportQty !== containerInfo.dispatchQty) {
              ElMessage({ type: 'error', message: `返修报工，报工数必须等于派工数`, grouping: true });
              return false;
            }
          }

          if (factoryUserattributesConfig.isWorkerChoseChecker && !reportDataInfo.Checker) {
            ElMessage({ type: 'error', message: `请选择检验员`, grouping: true });
            return false;
          }

          switch (containerInfo.containertype) {
            case 7:// 单件单卡限制
              if (childContainerTableRef.value.getSelectionRows().length === 0) {
                ElMessage({ type: 'error', message: `请勾选子批次号`, grouping: true });
                return false;
              }

              if (reportQty > 1) {
                ElMessage({ type: 'error', message: `单件单卡报工数不能大于1`, grouping: true });
                return false;
              }

              if (reportDataInfo.surPlusEmployeeName) {
                ElMessage({ type: 'error', message: `单件单卡不能填写结余件信息`, grouping: true });
                return false;
              }
              break;
            case 2:// 数量批限制
              if (reportedQty > 0 && testReportQty > 0 && reportQty === 0) {
                ElMessage({ type: 'error', message: `批次在该工序已存在报工记录，不能进行报工数为0的试件报工`, grouping: true });
                return false;
              }

              if (reportType.value === '首件') {
                // 没有填试件数量，首件数报工只能为1
                if (testReportQty === 0 && reportQty !== 1) {
                  ElMessage({ type: 'error', message: `报工数只能为1`, grouping: true });
                  return false;
                }

                //填了试件数量，首件报工数只能是0或者1
                if (testReportQty > 0 && reportQty > 1) {
                  ElMessage({ type: 'error', message: `报工数只能是0或者1`, grouping: true });
                  return false;
                }
              }

              if (reportType.value === '返修') {
                if (reportQty !== containerInfo.dispatchQty) {
                  ElMessage({ type: 'error', message: `返修报工，报工数必须等于派工数`, grouping: true });
                  return false;
                }
              }

              if (reportType.value === '其他') {
                if (reportQty > restQty && !reportDataInfo.surPlusEmployeeName) {
                  ElMessage({ type: 'error', message: `结余件确认人不能为空`, grouping: true });
                  return false;
                }
                if (testReportQty === 0 && reportQty === 0) {
                  ElMessage({ type: 'error', message: `报工数不能为0`, grouping: true });
                  return false;
                }
              }
              break;
            case 3://批量带子序号批次
              if (testReportQty > 0) {
                ElMessage({ type: 'error', message: `批量带子序号批次不允许试件报工`, grouping: true });
                return false;
              }

              if (childContainerTableRef.value.getSelectionRows().length !== reportQty) {
                ElMessage({ type: 'error', message: `报工数和勾选的记录条目数不匹配`, grouping: true });
                return false;
              }
              break;
            default:
              break;
          }

          // 其他报工校验
          let reportData = [];
          if (containerInfo.containertype === 7) {
            const selectRows = childContainerTableRef.value.getSelectionRows();
            for (const i of selectRows) {
              // 单件单卡报工时，批次id、派工id从子批次号表格中获取
              reportData.push({
                ...currentSelectContainer,
                containerid: i.containerid,
                containerstepdispatchid: i.containerstepdispatchid,
                wipqty: 1,
                containername: i.containername
              });
            }
          } else {
            reportData.push({
              ...currentSelectContainer,
              containername: containerInfo.containername
            });
          }

          // 叶片厂特殊校验
          if (userInfo.value.factorycode === '608') {
            const { KeyProcessBatchNo } = reportDataInfo;
            const iskey = reportData[0].iskey;
            if (iskey === 1 && !KeyProcessBatchNo) {
              ElMessage({ type: 'error', message: `所报工序是【关键工程工序】，必须填写【关键过程批次号】`, grouping: true });
              return false;
            }
            if (iskey === 0 && KeyProcessBatchNo) {
              ElMessage({ type: 'error', message: `所报工序不是【关键工程工序】，不能填写【关键过程批次号】`, grouping: true });
              return false;
            }
          }

          const resourceid = reportDataInfo.resourceid;
          const resourcename = resourceList.value.filter(i => i.resourceid === resourceid)[0].resourcename;
          const { data, status: { code, msg } } = await useFetch({
            url: `${baseAPI}?actions=checkReportData`,
            data: {
              type: 'checkReportData',
              reportData, resourceid, resourcename,
              factoryid: userInfo.value.factoryid,
              reportType: reportType.value,
              factorycode: userInfo.value.factorycode,
            }
          });

          if (!data.value) {
            ElMessage({ message: msg, grouping: true, type: 'error', });
            return false;
          }

          return true;
        }

        // 领工前校验
        async function checkReceiveData() {
          if (!containerInfo.productname) {
            ElMessage({ type: 'error', message: `请选择批次`, grouping: true });
            return false;
          }

          const { containertype, containerstepdispatchid, containername } = currentSelectContainer;
          const willBeReceiveData = [];
          if (containertype === 7) {
            const selectRows = childContainerTableRef.value.getSelectionRows();
            if (selectRows.length === 0) {
              ElMessage({ type: 'error', message: `请选择需要领工的批次`, grouping: true });
              return false;
            }
            for (const i of selectRows) {
              willBeReceiveData.push({ containerstepdispatchid: i.containerstepdispatchid, containername: i.containername });
            }
          } else {
            willBeReceiveData.push({ containerstepdispatchid, containername });
          }

          const config = {
            url: `${baseAPI}?actions=checkReceiveData`,
            data: { type: 'checkReceiveData', willBeReceiveData }
          };
          const { data, status: { code, msg } } = await useFetch(config);
          if (!data.value) {
            ElMessage({ type: 'error', message: msg, grouping: true });
            // 校验失败，强制刷新页面数据
            handleTaskFlush();
            return false;
          }
          return true;
        }

        // 模块1.【领工】
        async function handleReceiveClick() {
          const checkResult = await checkReceiveData();
          if (!checkResult) { return; }

          ElMessageBox.confirm(`确认要领工吗?`, '确认', { type: 'warning' }).then(async () => {
            const { containertype, containerstepdispatchid } = currentSelectContainer;
            const willBeReceiveData = [];
            if (containertype === 7) {
              const selectRows = childContainerTableRef.value.getSelectionRows();
              if (selectRows.length === 0) {
                return ElMessage({ type: 'error', message: `请选择需要领工的批次`, grouping: true });
              }
              for (const i of selectRows) {
                willBeReceiveData.push({ containerstepdispatchid: i.containerstepdispatchid });
              }
            } else {
              willBeReceiveData.push({ containerstepdispatchid });
            }

            const config = {
              url: `${baseAPI}?actions=saveReceive`,
              data: {
                type: 'saveReceive',
                WorkerID: userInfo.value.employeeid,//报工人
                willBeReceiveData
              }
            };
            const { status: { code, msg } } = await useFetch(config);
            if (code === 500) { return ElMessage({ type: 'error', message: msg, grouping: true }); }
            ElMessage.success(msg);
            handleTaskFlush();
          }).catch(() => {
            ElMessage({ type: 'info', message: '用户已取消领工' });
          });
        }

        // 领工撤销
        async function handleRevokeReceiveClick() {
          const { containertype, containerstepdispatchid } = currentSelectContainer;
          const willBeRevokeReceiveData = [];//待撤销的领工数据
          if (containertype === 7) {
            const selectRows = childContainerTableRef.value.getSelectionRows();
            if (selectRows.length === 0) {
              return ElMessage({ type: 'error', message: `请选择需要撤销领工的批次`, grouping: true });
            }
            for (const i of selectRows) {
              willBeRevokeReceiveData.push({ containerstepdispatchid: i.containerstepdispatchid });
            }
          } else {
            willBeRevokeReceiveData.push({ containerstepdispatchid });
          }

          const config = {
            url: `${baseAPI}?actions=checkReceiveStatus`,
            data: {
              type: 'checkReceiveStatus',
              willBeRevokeReceiveData
            }
          };
          const { data, total, status: { code, msg } } = await useFetch(config);
          if (total.value >= 1) {
            return ElMessage({ type: 'error', message: '批次存在报工记录，不能进行【领工撤销】操作' });
          }

          ElMessageBox.confirm(`确认要撤销领工吗?`, '确认', { type: 'warning' }).then(async () => {
            const config = {
              url: `${baseAPI}?actions=revokeReceiveData`,
              data: {
                type: 'revokeReceiveData',
                willBeRevokeReceiveData
              }
            };
            const { status: { code, msg } } = await useFetch(config);
            if (code === 500) { return ElMessage({ type: 'error', message: msg, grouping: true }); }
            ElMessage.success(msg);
            handleTaskFlush();
          }).catch(() => {
            ElMessage({ type: 'info', message: '用户已取消领工撤销' });
          });
        }

        // 模块2.【报工】
        async function handleReportClick() {
          if (!containerInfo.productname) { return ElMessage({ type: 'error', message: `请选择批次`, grouping: true }); }

          const isValid = await validateReport();

          if (!isValid) { return; }

          let reportData = [];
          let childContainerData = [];
          const selectRows = childContainerTableRef.value.getSelectionRows();
          const { containertype } = currentSelectContainer;
          let surPlusEmployeeID = '';// 结余件确认人id
          switch (containertype) {
            case 2:
              // 自检合格数 + 报废数 +　超差数
              const reportQty = parseInt(reportDataInfo.selfCheckPassQty)
                + parseInt(reportDataInfo.selfCheckDefeatQty)
                + parseInt(reportDataInfo.selfCheckLossQty);
              // 剩余可报数
              const restQty = parseInt(containerInfo.wipqty) - parseInt(containerInfo.reportedQty);
              // 数量批超报时，记录结余件确认人id
              if (reportQty > restQty) {
                surPlusEmployeeID = reportDataInfo.surPlusEmployeeID;
              }
              reportData.push({ ...currentSelectContainer, containername: containerInfo.containername });
              break;
            case 3:
              for (const i of selectRows) {
                childContainerData.push({
                  containerid: i.containerid,
                  selfCheckLossQty: i.status === true ? 1 : 0
                });
              }
              reportData.push({ ...currentSelectContainer, containername: containerInfo.containername });
              break;
            case 7:
              for (const i of selectRows) {
                // 单件单卡报工时，批次id、派工id从子批次号表格中获取
                reportData.push({
                  ...currentSelectContainer,
                  containerid: i.containerid,
                  containerstepdispatchid: i.containerstepdispatchid,
                  wipqty: 1,
                  containername: i.containername
                });
              }
              break;
            default:
              break;
          }

          ElMessageBox.confirm(`确认要报工吗?`, '确认', { type: 'warning' }).then(async () => {
            const config = {
              url: `${baseAPI}?actions=saveWorkReport`,
              data: {
                type: 'saveWorkReport',
                reportData,//报工数据
                childContainerData,//子序号批次数据
                reportType: reportType.value,//检验类型
                FactoryID: userInfo.value.factoryid,//分厂
                factorycode: userInfo.value.factorycode,//分厂代码
                employeename: userInfo.value.employeename,//工人员工号
                WorkerID: userInfo.value.employeeid,//报工人
                WorkCenterID: userInfo.value.workcenterid,//工区
                TeamID: userInfo.value.teamid,//班组
                FirstContainerNo: reportDataInfo.firstcheckcontainerno,//首件批次号
                KeyProcessBatchNo: reportDataInfo.KeyProcessBatchNo,//关键过程批次号
                Qty2: reportDataInfo.Qty2,//备注一(数量)
                UOM2ID: reportDataInfo.UOM2ID,//备注二(单位)
                Note: reportDataInfo.notes,//报工备注
                INMTQty: reportDataInfo.INMTQty,//试件数
                INMTLossQty: reportDataInfo.INMTLossQty,//试件废票数
                surPlusEmployeeID,//结余件确认人
                CheckerID: reportDataInfo.Checker,//检验员
                ResourceID: reportDataInfo.resourceid,//报工设备
                selfCheckPassQty: reportDataInfo.selfCheckPassQty,//报工数
                selfCheckLossQty: reportDataInfo.selfCheckLossQty,//自检报废数
                selfCheckDefeatQty: reportDataInfo.selfCheckDefeatQty,//自检超差数
                reportedQty: containerInfo.reportedQty,//已报工数
              }
            };
            const { data, status: { code, msg } } = await useFetch(config);
            if (!data.value) { return ElMessage({ message: msg, grouping: true, type: 'error' }); }
            ElMessage.success(msg);
            handleTaskFlush();
          }).catch(() => {
            ElMessage({ type: 'info', message: '已取消报工' });
          });
        }

        // 报工撤销
        function handleRevokeReportClick() {
          const willBeRevokeReportData = [];//待撤销的报工数据
          const selectRows = unCheckDetailListRef.value.getSelectionRows();
          if (selectRows.length === 0) {
            return ElMessage({ type: 'error', message: `请选择需要撤销报工的批次`, grouping: true });
          }

          for (const i of selectRows) {
            const { containername, ishold } = i;
            if (ishold === '1') {
              return ElMessage({ type: 'error', message: `批次：【${containername}】已暂停，不能撤销报工`, grouping: true });
            }
          }

          ElMessageBox.confirm(`确认要撤销报工吗?`, '确认', { type: 'warning' }).then(async () => {
            const config = {
              url: `${baseAPI}?actions=revokeReportData`,
              data: {
                type: 'revokeReportData',
                willBeRevokeReportData: selectRows,
                employeename: userInfo.value.employeename
              }
            };
            const { data, status: { code, msg } } = await useFetch(config);
            if (data.value === true) {
              ElMessage.success('报工撤销成功');
              handleTaskFlush();
            } else {
              ElMessage({ type: 'error', message: msg, grouping: true });
            }
          }).catch(() => {
            ElMessage({ type: 'info', message: '用户已取消撤销报工' });
          });
        }

        // 模块3.【文档查看】
        async function handleDocumentViewClick() {
          getDocumentViewTreeData({ currentSelectContainer, baseAPI });
        }

        // 模块3.【文档查看】- 文档查看节点点击，查询工艺下的文档信息
        async function handleNodeClick(node) {
          const { id, type } = node;
          await getDocumentList({ url: `${baseAPI}`, method: 'getDocumentList', id, nodeType: type });
        }

        // 模块3.【文档查看】- 打开文档
        async function handleOpenDocumentClick(filepath) {
          await downloadFile({ url: `${baseAPI}`, method: 'getDownloadUrl', filepath });
        }

        // 模块4.【流水卡预览】
        function handleContainerViewClick() {
          openContainerViewPage({ activeMenuName, unCheckDetailListRef, childContainerTableRef, containerInfo, currentSelectContainer, userInfo });
        }

        // 模块5.【配套表查看】
        function handleBomViewClick() {
          openBomViewPage({ activeMenuName, unCheckDetailListRef, containerInfo, childContainerTableRef, currentSelectContainer, userInfo });
        }

        // 模块6.【超越单查看】
        async function handleSurpassbillClick() {
          getSurpassbillInfo({ activeMenuName, unCheckDetailListRef, childContainerTableRef, containerInfo, currentSelectContainer, baseAPI });
        }

        // 模块7.【实测值录入】
        function handleInputCheckPointResultClick() {
          const { containertype } = currentSelectContainer;
          if (containertype === 7) {
            const selectRows = childContainerTableRef.value.getSelectionRows();
            if (selectRows.length === 0) {
              return ElMessage({ type: 'error', message: '请勾选批次号', grouping: true });
            }
            if (selectRows.length >= 2) {
              return ElMessage({ type: 'error', message: '【实测值录入】只能选择单个批次进行操作', grouping: true });
            }
            // 单价单卡从勾选的子批次获取批次id和批次号
            currentSelectContainer.containerid = selectRows[0].containerid;
            currentSelectContainer.containername = selectRows[0].containername;
          }
          initInputCheckResultDialogData(currentSelectContainer, userInfo);
        }

        // 模块8.【问题快反】
        function handleMESFeedbackClick() {
          getMESFeedBackData({
            url: `${baseAPI}`,
            method: 'getMESFeedBackData',
            feedBackDisabled: pageObj.feedBackDisabled,
            selectRows: childContainerTableRef.value.getSelectionRows(),
            resourceList,
            containerInfo,
            currentSelectContainer,
            employeename: userInfo.value.employeename
          });
        }

        // 模块9.【设备状态录入】
        async function handleResourceStatusClick() {
          if (pageObj.resourceStatusDisabled) { return; }
          resourceStatusMaintDialogVisible.value = true;
          await getResourceStatusListData({
            url: `${baseAPI}`,
            method: 'getResourceStatusListData', employeeid: userInfo.value.employeeid
          });
        }

        // 模块9.【设备状态录入】- 设备状态录入确认点击
        function handleResourceStatusConfirmClick() {
          resourceStatusConfirm({ url: `${baseAPI}`, employeeid: userInfo.value.employeeid });
        }

        // 自检合格数 失去焦点后
        function handleSelfCheckPassQtyBlur() {
          checkSelfCheckPassQty({ reportDataInfo, containerInfo, childContainerTableRef, childContainerList });
        }

        // 自检超差数 失去焦点后
        function handleSelfCheckDefeatQtyBlur() {
          checkSelfCheckDefeatQty({ reportDataInfo });
        }

        // 自检报废数 失去焦点后
        function handleSelfCheckLossQtyBlur() {
          checkSelfCheckLossQty({ reportDataInfo });
        }

        // 试件数 失去焦点后
        function handleINMTQtyBlur() {
          checkINMTQty({ reportDataInfo });
        }

        // 试件废票数 失去焦点后
        function handleINMTLossQtyBlur() {
          checkINMTLossQty({ reportDataInfo, containerInfo });
        }

        // 结余件确认扫卡
        function handleSurPlusEmployeeBlur() {
          setSurPlusEmployeeInfo({ reportDataInfo, userInfo, baseAPI });
        }

        // 查询叶片首件批次号
        function handleYpFirstContainerSearchClick() {
          getFirstContainerData({ containerInfo, userInfo, baseAPI });
        }

        // 叶片首件批次号选择确认
        function handleFirstContainerConfirmClick() {
          setFirstContainer({ reportDataInfo });
        }

        // 跳转零件进度表
        function handleProcessDashboardClick() {
          ElMessageBox.confirm(`即将跳转并打开【零件进度表】页面，是否继续?`, '确认', { type: 'warning' }).then(async () => {
            let hostname = window.location.hostname === 'localhost' ? 'localhost' : '10.15.7.75';
            const url = `http://${hostname}/MESReport/kanban/ContainerCurrentProgressDashBoard.html?uid=${userInfo.value.employeeid}`
            window.open(url);
          }).catch(() => {
            ElMessage({ type: 'info', message: '已取消' });
          });
        }

        // NC程序附件查看
        async function handleNCProgramViewClick() {
          getNCProgramData({ currentSelectContainer, baseAPI });
        }

        // 跳转其他系统链接
        function openUrl(pagename) {
          const urlMap = [
            { pagename: '按需配送', pageurl: `http://10.15.5.32:8088/portal/open_home.jsp?param=${userInfo.value.employeename}_!_page1`, },
            { pagename: '工位接收', pageurl: `http://10.15.5.32:8088/portal/open_home.jsp?param=${userInfo.value.employeename}_!_page4`, },
            { pagename: '单元接收', pageurl: `http://10.15.5.32:8088/portal/open_home.jsp?param=${userInfo.value.employeename}_!_page5`, },
            { pagename: '回收发起', pageurl: `http://10.15.5.32:8088/portal/open_home.jsp?param=${userInfo.value.employeename}_!_page6`, },
            { pagename: '快反待办', pageurl: `http://10.15.7.76/insitewebapplication/mes-feedback-task-list.html?employeeid=${Encrypt(userInfo.value.employeeid)}`, },
          ];
          const filter = urlMap.filter(i => i.pagename === pagename);
          if (filter.length > 0) {
            const { pagename, pageurl } = filter[0];
            ElMessageBox.confirm(`即将跳转并打开【${pagename}】页面，是否继续?`, '确认', { type: 'warning' }).then(async () => {
              window.open(pageurl);
            }).catch(() => {
              ElMessage({ type: 'info', message: '已取消' });
            });
          }
        }
        //三定卡片查看
        const {
          threeCard,
          getThreeCardDataList,
          getThreeCardDetailList
        } = useThreeCard();
        async function handleThreeCardViewClick() {
          getThreeCardDataList(currentSelectContainer.workflowid, currentSelectContainer.productname);
        }
        async function getThreeCardDetail(row) {
          getThreeCardDetailList(row.id)
        }
        // 页面声明周期钩子
        onMounted(async () => {
          let incrementNumber = () => {
            setTimeout(incrementNumber, 3000);
            currentTime.value = dayjs().format('YYYY年MM月DD日  HH:mm');
          }

          setTimeout(incrementNumber, 0);

          // 查询当前用户信息，绑定给响应式变量 userInfo
          const uid = Decrypt(getParams('uid'));
          await getUserInfo({ url: `${FetchCommonUrl}`, method: 'getUserInfo', employeeid: uid });

          // 用户并不存在
          if (!userInfo.value.employeeid) {
            for (const key in pageObj) { pageObj[key] = true; }// 禁用相关按钮及表单
            for (const key in btnsConfig) { btnsConfig[key] = true; }// 禁用按钮
            return ElNotification({ title: '错误', message: '用户不存在', type: 'error', duration: 0, });
          }

          const { factorycode, factoryid, employeeid } = userInfo.value;

          //盘轴厂、机匣厂、工装工具厂、钣焊厂、叶片厂、结构件厂
          const allowedFacotrys = ['600', '601', '604', '607', '608', '609'];
          if (allowedFacotrys.filter(i => i === factorycode).length === 0) {
            for (const key in pageObj) {
              // 用户存在，但不在所允许的车间时，仅可以提问题快反。
              pageObj[key] = (key === 'feedBackDisabled' ? false : true);
            }
            return ElNotification({ title: '错误', message: '当前分厂暂不能使用该功能', type: 'error', duration: 0, });
          }

          // 查询分厂配置项
          await getFactoryUserattributes({ url: `${baseAPI}`, method: 'getFactoryUserattributes', factoryid });

          // 查询UOM
          getUomList({ url: `${FetchCommonUrl}`, method: 'getUomList' });

          // 查询分厂检验员
          getFactoryUsersByRoleName({ url: `${FetchCommonUrl}`, method: 'getFactoryUsersByRoleName', factoryid, rolename: '检验员' });

          // 查询排班信息
          getEmployeeWorkdate({ url: `${baseAPI}`, method: 'getEmployeeWorkdate', employeeid });

          //查询工时
          getWorkerWorkTime({ url: `${baseAPI}`, method: 'getWorkerWorkTime', employeeid, day: dayjs().format('D') });

          if (factoryUserattributeList.value.some(i => i.userattributename === '报工选择检验' && i.attributevalue === '是')) {
            factoryUserattributesConfig.isWorkerChoseChecker = true;//页面显示：检验员下拉框
          }
          if (factoryUserattributeList.value.some(i => i.userattributename === '报工自检' && i.attributevalue === '是')) {
            factoryUserattributesConfig.isWorkerCheckSelf = true;//页面显示：1.自检合格数 2.自检报废数 3.自检超差数
          }

          // 查询【待完成任务】总数
          getUnReportWorkflowStepCount();
          // 查询待领工数据
          getUnReceivedData({
            url: `${baseAPI}`, method: 'getUnReceivedData',
            factoryid: userInfo.value.factoryid,
            workerid: userInfo.value.employeeid,
            ...searchObj,//页面扫卡信息
          });
          // 查询待报工数据
          getUnReportedData({
            url: `${baseAPI}`, method: 'getUnReportedData',
            factoryid: userInfo.value.factoryid,
            workerid: userInfo.value.employeeid,
            ...searchObj,//页面扫卡信息
          });
          // 查询待检验数据
          getUnCheckContainerDataList({
            url: `${baseAPI}`,
            method: 'getUnCheckData',
            factoryid: userInfo.value.factoryid,
            workerid: userInfo.value.employeeid,
            ...searchObj//页面扫卡信息
          });
        })

        // 返回给页面使用的数据
        return {
          currentTime,//当前时间
          btnsConfig,//按钮禁用配置对象
          containerInfo,
          reportDataInfo,
          resourceList,//报工设备下拉框
          reportType,//报工类型
          reportZone,
          tabIndex,//右侧选项卡当前索引
          uomList,
          checkerList,//检验员下拉框
          clientHeight, inputHeight, tableHeight,

          childContainerList,//【子批次号】表格数据
          collectInfoList,//【集件信息】表格数据
          unCheckDetailList,//【待检验信息】表格数据
          childContainerTableRef,//【子批次号】表格ref引用
          unCheckDetailListRef,//【待检验信息】表格ref引用

          notReceivedList,//【待接收】批次数据
          notReportedList,//【待报工】批次数据
          unCheckContainerData,//【待检验】批次数据
          unReceiveDataRows,//【待接收】总数
          unReportDataRows,//【待报工】总数
          unCheckContainerCount,//【待检验】总数

          splitDate, dateFormatter,

          factoryUserattributesConfig,//分厂配置项
          userInfo,//当前用户信息
          searchObj,
          pageObj,

          firstCheckDialogVisible,//首件批次号弹窗隐藏
          checkedContainerNoList,//已指定的首件批次号
          currentContainerNoList,//当前批次子序号
          checkedContainerNoListTableRef,//已指定的首件批次号Table页面ref引用
          currentContainerNoListTableRef,//当前批次子序号Table页面ref引用

          menuSelect,//menu选择事件 
          menuDataRef,//menu页面ref引用

          loadUnReceiveData,//加载【待领工】右侧详细数据
          loadUnReportData,//加载【待报工】右侧详细数据
          loadUnCheckData,//加载【待检验】右侧详细数据

          handleSelfCheckPassQtyBlur,//【自检合格数】失去焦点后
          handleSelfCheckDefeatQtyBlur,//【自检超差数】失去焦点后
          handleSelfCheckLossQtyBlur,//【自检报废数】失去焦点后
          handleINMTQtyBlur,//【试检数】失去焦点后
          handleINMTLossQtyBlur,//【试检废票数】失去焦点后
          handleSurPlusEmployeeBlur,//结余件确认扫卡
          handleReceiveClick,//处理领工按钮点击
          handleReportClick,//处理报工按钮点击
          handleSelectionChange,//【子批次表格】选择变更
          handleTaskFlush,//刷新
          handleDocumentViewClick,//【文档查看】按钮点击
          handleMESFeedbackClick,// 问题快反
          handleUserInfoFlushClick,//刷新员工信息数据
          handleSurpassbillClick,//【超越单查看】按钮点击
          handleBomViewClick,//【配套表查】按钮点击
          handleContainerViewClick,//【流卡预览】按钮点击
          handleResourceStatusClick,//【设备状态录入】按钮点击
          handleResourceStatusConfirmClick,// 设备状态录入点击
          handleRevokeReceiveClick,// 【撤销领工】按钮点击
          handleRevokeReportClick,// 【撤销报工】按钮点击
          handleContainerSearchBlur,
          handleNodeClick,//【文档查看】- 文档查看节点点击
          handleOpenDocumentClick,//【文档查看】-【查看文档】按钮点击
          handleYpFirstContainerSearchClick,//【首件批次号】按钮点击
          handleFirstContainerConfirmClick,//叶片首件批次号选择确认
          handleNCProgramViewClick,//【NC附件查看】按钮点击

          documentViewDialogVisible,//文档查看弹出框
          treeData,//文档查看Tree数据
          documentList,//文档查看文件清单
          employeeWorkDate,//排班信息
          worktime,//工时
          surpassbillDialogVisible,//超越单查看弹出框隐藏
          surpassbillInfoList,//【超越单信息】表格数据
          surpassDocList,//【超越单附件信息】表格数据
          resourceStatus,//设备状态
          resourceStatusMaintDialogVisible,//【设备状态】弹出框隐藏
          resourceStatusList,//【设备清单】表格数据
          resourceStatusListRef,//【设备清单】表格ref引用
          currentSubMenuItemName,//当前选中的子菜单名称

          // 实测值录入
          handleInputCheckPointResultClick,//【实测值录入】按钮
          inputCheckResultObj,
          initInputCheckResultDialogData,
          inputCheckResultDialogCheckItemTableRef,//检测项表格ref
          inputCheckResultDialogChildContainerRef,//子序号批次表格ref
          inputCheckResultDialogCheckResultTableRef,//检测项结果表格ref
          importCheckResultUploadRef,//检查项导入ref
          getStepCheckPointResult,//查询检测项录入结果
          handleCheckPointAddClick,//【增加】按钮点击
          handleUpdateCheckPointValueClick,//【保存】按钮点击 
          deleteCheckPointResult,//删除检测项
          exportCheckPointResult,//导出检测项
          importCheckPointResult,//导入检测项
          handleCheckResultImportSuccess,//检测项导入成功事件
          checkItemRowClick,//检测项row点击事件
          sendToThreeCoordinateRecord,//推送三坐标
          fileUploadRef,//文件上传ref
          handleFileUploadSuccess,//文件上传成功事件
          uploadFileSubmit,//文件上传提交

          unReportWorkflowStepCount,//待完成任务数
          handleUnReportWorkflowStepCountClick,//【待完成任务数】点击
          unReportWorkflowStepObj,
          handleUnReportWorkflowStepDetailCurrentChange,

          handleProcessDashboardClick,//【零件进度表】按钮点击
          openUrl,// 跳转其他系统链接

          ncProgramViewDialogVisible,
          ncProgramDataList,//数控程序清单
          ncProgarmResourcesList,//设备清单
          ncProgarmFilesList,//附件清单
          getNCProgramDetail,
          tableRowClassName,

          threeCard,//三定卡片对象
          getThreeCardDataList,
          getThreeCardDetailList,
          handleThreeCardViewClick,
          getThreeCardDetail
        }
      }
    };
    const app = createApp(App);
    app.use(ElementPlus, {
      locale: ElementPlusLocaleZhCn,
      //size: 'normal'
    });
    // 注册所有icon
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
      switch (key) {
        case "View":
          app.component('icon-view', component)
          break;
        case "Menu":
          app.component('icon-menu', component)
          break;
        default:
          app.component(key, component)
          break;
      }
    }

    app.mount('#app');
  </script>
</body>

</html>